aboutsummaryrefslogtreecommitdiffstatsci
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2016-01-20 08:41:36 +0100
committerjpbruyere <jp.bruyere@hotmail.com>2016-01-20 08:41:36 +0100
commite530a408d849e1891117c20ba3d330e6b7a03e3a (patch)
tree76880bcf620efdd0ac21a8a704784708842473d0
parentd15711aef9c489baec328fb45c76cd4e29dd17b9 (diff)
init textures to rgba(0,0,0,0) when created, window title bugcairogl
-rwxr-xr-xTests/Interfaces/test0.goml4
-rw-r--r--src/GraphicObjects/GraphicObject.cs9
2 files changed, 10 insertions, 3 deletions
diff --git a/Tests/Interfaces/test0.goml b/Tests/Interfaces/test0.goml
index f0b78d14..d8ff1027 100755
--- a/Tests/Interfaces/test0.goml
+++ b/Tests/Interfaces/test0.goml
@@ -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>
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs
index e54f4b12..9d88cea1 100644
--- a/src/GraphicObjects/GraphicObject.cs
+++ b/src/GraphicObjects/GraphicObject.cs
@@ -764,6 +764,10 @@ namespace go
#endif
using (Context gr = new Context (draw)) {
gr.Antialias = Antialias.Subpixel;
+ gr.Operator = Operator.Source;
+ gr.SetSourceRGBA(0,0,0,0);
+ gr.Paint();
+ gr.Operator = Operator.Over;
onDraw (gr);
}
draw.Flush ();
@@ -787,10 +791,10 @@ namespace go
#if CAIRO_GL
using (Surface source = new GLSurface
- (device, Content.ColorAlpha, texID, rb.Width, rb.Height)) {
+ (device, Content.ColorAlpha, texID, Slot.Width, Slot.Height)) {
#else
using (Surface source =
- new ImageSurface(bmp, Format.Argb32, rb.Width, rb.Height, 4 * Slot.Width)) {
+ new ImageSurface(bmp, Format.Argb32, Slot.Width, Slot.Height, 4 * Slot.Width)) {
#endif
if (this.Background == Color.Clear) {
ctx.Save ();
@@ -801,6 +805,7 @@ namespace go
}
ctx.SetSourceSurface (source, rb.X, rb.Y);
ctx.Paint ();
+ source.Flush();
}
}