From aa140f4d3e07985596b063242e8c03013a0cba7f Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Wed, 9 Sep 2015 09:55:32 +0200 Subject: [PATCH] clip to client zone with corner radius code cleaning --- src/GraphicObjects/PrivateContainer.cs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/GraphicObjects/PrivateContainer.cs b/src/GraphicObjects/PrivateContainer.cs index 01502bd4..b6391621 100644 --- a/src/GraphicObjects/PrivateContainer.cs +++ b/src/GraphicObjects/PrivateContainer.cs @@ -81,7 +81,7 @@ namespace go } protected override Size measureRawSize () { - return child == null ? Bounds.Size : new Size(child.Slot.Width + 2 * Margin, child.Slot.Height + 2 * (Margin)); + return child == null ? Bounds.Size : child.Slot.Size + 2 * Margin; } public override void OnLayoutChanges (LayoutingType layoutType) @@ -120,23 +120,15 @@ namespace go ctx.Save(); - // ctx.Rectangle(ContextCoordinates(Slot)); - // ctx.Clip(); - // - - if (clip != null) clip.clip(ctx); base.Paint(ref ctx, clip); //clip to client zone - ctx.Rectangle(Parent.ContextCoordinates(ClientRectangle + Slot.Position)); + CairoHelpers.CairoRectangle (ctx, Parent.ContextCoordinates(ClientRectangle + Slot.Position), CornerRadius); ctx.Clip(); - // if (clip != null) - // clip.Rebase(this); - if (child != null) child.Paint(ref ctx, clip); -- 2.47.3