diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-12 19:12:09 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-12 19:12:09 +0100 |
| commit | 331908c17a8cf80759c184a10aa2adf11ae61fb7 (patch) | |
| tree | be51a90d74d579c632a930f8bcdb2e32aaa195a5 /src/GraphicObjects | |
| parent | ca41f683073e872f3f58c0a519e574bdaf4a2c2c (diff) | |
add clean color test
Diffstat (limited to 'src/GraphicObjects')
| -rw-r--r-- | src/GraphicObjects/GraphicObject.cs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index 610d97f1..85166d4f 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -850,16 +850,16 @@ namespace Crow protected virtual void UpdateCache(Context ctx){ Rectangle rb = Slot + Parent.ClientRectangle.Position; using (ImageSurface cache = new ImageSurface (bmp, Format.Argb32, Slot.Width, Slot.Height, 4 * Slot.Width)) { - // //TODO:improve equality test for basic color and Fill - // if (this.Background is SolidColor) { - // if ((this.Background as SolidColor).Equals (Color.Clear)) { - // ctx.Save (); - // ctx.Operator = Operator.Clear; - // ctx.Rectangle (rb); - // ctx.Fill (); - // ctx.Restore (); - // } - // } + //TODO:improve equality test for basic color and Fill + if (this.Background is SolidColor) { + if ((this.Background as SolidColor).Equals (Color.Clear)) { + ctx.Save (); + ctx.Operator = Operator.Clear; + ctx.Rectangle (rb); + ctx.Fill (); + ctx.Restore (); + } + } ctx.SetSourceSurface (cache, rb.X, rb.Y); ctx.Paint (); } |