diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2015-09-14 23:15:31 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2015-09-14 23:15:31 +0200 |
| commit | b2bef2567b1fa60ec7f9f91ab475fd0e02dbc834 (patch) | |
| tree | 40fadd94a017a62db86e42aef6b34b3f7bccf343 /src/GraphicObjects/GraphicObject.cs | |
| parent | 475b4dc3ea6354474349c9408fe03cc53b946d8a (diff) | |
Color.Clear to make it possible transparency with GroupBox Title
without the border over the text
test0 to test the concept
Diffstat (limited to 'src/GraphicObjects/GraphicObject.cs')
| -rw-r--r-- | src/GraphicObjects/GraphicObject.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index c3c22e7b..6a146c64 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -664,6 +664,13 @@ namespace go Rectangle rb = Parent.ContextCoordinates(Slot);
using (ImageSurface source = new ImageSurface(bmp, Format.Argb32, rb.Width, rb.Height, 4 * Slot.Width)) {
+ if (this.Background == Color.Clear) {
+ ctx.Save ();
+ ctx.Operator = Operator.Clear;
+ ctx.Rectangle(rb);
+ ctx.Fill ();
+ ctx.Restore ();
+ }
ctx.SetSourceSurface (source, rb.X, rb.Y);
ctx.Paint ();
}
|