public static Rect ApplyMargins(this Rect rect, Margin margin) { return new Rect( rect.Left + margin.Left, rect.Top + margin.Top, Math.Max(rect.Width - margin.Left - margin.Right, 0), Math.Max(rect.Height - margin.Top - margin.Bottom, 0)); }
public TreemapIndex() { HasHeader = false; Padding = new Margin(0); FillColor = Color.Transparent; LineVisible = true; LineWeight = 1f; LineColor = Color.White; FontSize = 11; FontColor = Color.Black; FontBold = false; FontOutline = false; FontOutlineColor = Color.Black; FontOutlineWeight = 1; FontGlowRadius = 0; FontGlowColor = Color.Transparent; }
public void SetMargin(Margin margin) { InnerRectangle = InnerRectangle.ApplyMargins(margin); Empty = Empty.ApplyMargins(margin); }