diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-08-03 11:16:56 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-08-03 11:16:56 +0200 |
| commit | c601f875010332cb4189a206a2c5ffa5fd6e8bea (patch) | |
| tree | 5d6fba71f8c7f956f6cdc2c17825a9951652f724 /src/GraphicObjects/PrivateContainer.cs | |
| parent | 51e7ed159c72331bf1003b3fc88ee68753724a2a (diff) | |
remove image property, set img as fixed in template
modifié : Templates/CheckBox.goml
modifié : Templates/RadioButton.goml
modifié : src/GraphicObjects/CheckBox.cs
debug
modifié : Templates/MessageBox.goml
Deep clone
modifié : src/GraphicObjects/GraphicObject.cs
modifié : src/GraphicObjects/Group.cs
Deep clone and code clean
modifié : src/GraphicObjects/PrivateContainer.cs
modifié : src/GraphicObjects/RadioButton.cs
Diffstat (limited to 'src/GraphicObjects/PrivateContainer.cs')
| -rw-r--r-- | src/GraphicObjects/PrivateContainer.cs | 48 |
1 files changed, 8 insertions, 40 deletions
diff --git a/src/GraphicObjects/PrivateContainer.cs b/src/GraphicObjects/PrivateContainer.cs index 1bf53de4..14c2a680 100644 --- a/src/GraphicObjects/PrivateContainer.cs +++ b/src/GraphicObjects/PrivateContainer.cs @@ -168,28 +168,15 @@ namespace Crow } protected override void UpdateCache (Context ctx) { - //ctx.Save (); - Rectangle rb = Slot + Parent.ClientRectangle.Position; using (ImageSurface cache = new ImageSurface (bmp, Format.Argb32, Slot.Width, Slot.Height, 4 * Slot.Width)) { Context gr = new Context (cache); - //clip to client zone - CairoHelpers.CairoRectangle (gr, ClientRectangle, CornerRadius); - gr.Clip (); - if (Clipping.count > 0) { - Clipping.clearAndClip (gr); - if (child != null) { - - base.onDraw (gr); - - - child.Paint (ref gr); - } + onDraw (gr); } gr.Dispose (); @@ -198,33 +185,7 @@ namespace Crow ctx.Paint (); } Clipping.Reset(); - - //ctx.Restore (); } -// public override Rectangle ContextCoordinates (Rectangle r) -// { -// return -// Parent.ContextCoordinates(r) + Slot.Position + ClientRectangle.Position; -// } -// public override void Paint(ref Cairo.Context ctx) -// { -// if (!Visible)//check if necessary?? -// return; -// -// ctx.Save(); -// -// base.Paint(ref ctx); -// -// //clip to client zone -// CairoHelpers.CairoRectangle (ctx, Parent.ContextCoordinates(ClientRectangle + Slot.Position), CornerRadius); -// ctx.Clip(); -// -// if (child != null) -// child.Paint(ref ctx); -// -// ctx.Restore(); -// } - #endregion #region Mouse handling @@ -243,6 +204,13 @@ namespace Crow child.ClearBinding (); base.ClearBinding (); } + public override GraphicObject DeepClone () + { + PrivateContainer tmp = base.DeepClone () as PrivateContainer; + if (child != null) + tmp.SetChild (child.DeepClone ()); + return tmp; + } } } |