public RoundedCorners(BorderProperty border) { Border = border; // Grab the computed style: Computed = border.RenderData.computedStyle; // Create the inverse border set: InverseBorder = new RoundBorderInverseProperty(border.RenderData); }
/// <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); }
/// <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; } }