]> O.S.I.I.S - jp/crow.git/commitdiff
add clean color test
authorjpbruyere <jp.bruyere@hotmail.com>
Fri, 12 Feb 2016 18:12:09 +0000 (19:12 +0100)
committerjpbruyere <jp.bruyere@hotmail.com>
Fri, 12 Feb 2016 18:12:09 +0000 (19:12 +0100)
src/GraphicObjects/GraphicObject.cs

index 610d97f1c601a1c70ad54e759606fe28c6b40d95..85166d4f7b061bda69dfd3bf83f758a9174d7929 100644 (file)
@@ -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 ();
                        }