]> O.S.I.I.S - jp/crow.git/commitdiff
init textures to rgba(0,0,0,0) when created, window title bug cairogl
authorjpbruyere <jp.bruyere@hotmail.com>
Wed, 20 Jan 2016 07:41:36 +0000 (08:41 +0100)
committerjpbruyere <jp.bruyere@hotmail.com>
Wed, 20 Jan 2016 07:41:36 +0000 (08:41 +0100)
Tests/Interfaces/test0.goml
src/GraphicObjects/GraphicObject.cs

index f0b78d144556c8ff7af21ef6902a49cac28660b5..d8ff1027a930a114e195483c0480abd580e65b33 100755 (executable)
@@ -1,2 +1,4 @@
 <?xml version="1.0"?>
-<GraphicObject Width="200" Background="Green"/>
+<Container Width="300" Height="300" Background="Red">
+       <GraphicObject Width="200" Height="200" Background="Green"/>
+</Container>
index e54f4b12816fe0284d5cf2a18d10e711bf661abf..9d88cea1917df12f8175cf68c135b2d9f22f2f63 100644 (file)
@@ -764,6 +764,10 @@ namespace go
                        #endif\r
                                using (Context gr = new Context (draw)) {\r
                                        gr.Antialias = Antialias.Subpixel;\r
+                                       gr.Operator = Operator.Source;\r
+                                       gr.SetSourceRGBA(0,0,0,0);\r
+                                       gr.Paint();\r
+                                       gr.Operator = Operator.Over;\r
                                        onDraw (gr);\r
                                }\r
                                draw.Flush ();\r
@@ -787,10 +791,10 @@ namespace go
 \r
                        #if CAIRO_GL\r
                        using (Surface source = new GLSurface\r
-                               (device, Content.ColorAlpha, texID, rb.Width, rb.Height)) {\r
+                               (device, Content.ColorAlpha, texID, Slot.Width, Slot.Height)) {\r
                        #else\r
                        using (Surface source =\r
-                       new ImageSurface(bmp, Format.Argb32, rb.Width, rb.Height, 4 * Slot.Width)) {\r
+                       new ImageSurface(bmp, Format.Argb32, Slot.Width, Slot.Height, 4 * Slot.Width)) {\r
                        #endif\r
                                if (this.Background == Color.Clear) {\r
                                        ctx.Save ();\r
@@ -801,6 +805,7 @@ namespace go
                                }\r
                                ctx.SetSourceSurface (source, rb.X, rb.Y);\r
                                ctx.Paint ();\r
+                               source.Flush();\r
                        }\r
                }\r
 \r