Exemple #1
0
        public RoundedCorners(BorderProperty border)
        {
            Border = border;

            // Grab the computed style:
            Computed = border.RenderData.computedStyle;

            // Create the inverse border set:
            InverseBorder = new RoundBorderInverseProperty(border.RenderData);
        }
Exemple #2
0
        /// <summary>Call this if the current property requies a border object.</summary>
        public BorderProperty GetBorder(ComputedStyle style)
        {
            RenderableData rd     = style.RenderData;
            BorderProperty border = rd.Border;

            if (border == null)
            {
                rd.Border = border = new BorderProperty(rd);
            }

            return(border);
        }
Exemple #3
0
        /// <summary>Creates a new rounded corner in the given position.</summary>
        public RoundCorner(RoundedCorners roundCorners, RoundCornerPosition position)
        {
            Position      = position;
            RoundCorners  = roundCorners;
            Border        = roundCorners.Border;
            InverseBorder = roundCorners.InverseBorder;

            // Get the to index:
            ToIndex = (int)position;

            // Get the from index:
            FromIndex = ToIndex - 1;

            // May need to wrap it:
            if (FromIndex == -1)
            {
                FromIndex = 3;
            }
        }