diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2015-09-09 09:55:32 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2015-09-09 09:55:32 +0200 |
| commit | aa140f4d3e07985596b063242e8c03013a0cba7f (patch) | |
| tree | c8b2013c55ae46f04c55c1975b7f8fda0c3c7088 /src | |
| parent | cc06e82be44573a8d5da3b3c96858e1e42c5df12 (diff) | |
clip to client zone with corner radius
code cleaning
Diffstat (limited to 'src')
| -rw-r--r-- | src/GraphicObjects/PrivateContainer.cs | 12 |
1 files 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); |