Example #1
0
        /// <summary>
        /// Create the specified center, width, height, cornerRadiusX and cornerRadiusY.
        /// </summary>
        /// <param name="center">Center.</param>
        /// <param name="width">Width.</param>
        /// <param name="height">Height.</param>
        /// <param name="cornerRadiusX">Corner radius x.</param>
        /// <param name="cornerRadiusY">Corner radius y.</param>
        public static LW_Rectangle Create(Vector2 center = default(Vector2), float width = 80f, float height = 80f, float cornerRadiusX = 0, float cornerRadiusY = 0)
        {
            LW_Rectangle instance = CreateInstance <LW_Rectangle>();

            instance.Set(center, width, height, cornerRadiusX, cornerRadiusY);
            return(instance);
        }
Example #2
0
        internal override void CopyPropertiesFrom(LW_Element element)
        {
            LW_Rectangle rectangle = element as LW_Rectangle;

            if (rectangle != null)
            {
                m_Center  = rectangle.m_Center;
                m_Width   = rectangle.m_Width;
                m_Height  = rectangle.m_Height;
                m_RadiusX = rectangle.m_RadiusX;
                m_RadiusY = rectangle.m_RadiusY;
            }
            base.CopyPropertiesFrom(element);
        }