]> O.S.I.I.S - jp/crow.git/commitdiff
clip to client zone with corner radius
authorjpbruyere <jp.bruyere@hotmail.com>
Wed, 9 Sep 2015 07:55:32 +0000 (09:55 +0200)
committerjpbruyere <jp.bruyere@hotmail.com>
Wed, 9 Sep 2015 07:55:32 +0000 (09:55 +0200)
code cleaning

src/GraphicObjects/PrivateContainer.cs

index 01502bd4f984fa53ba9c7a02f126b6b5ad54b36a..b6391621fa5d4a57a9e4d5af29bc11bb805304da 100644 (file)
@@ -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);