seems to work (#891)

This commit is contained in:
Felix Andreas 2020-08-03 19:08:23 +02:00 committed by GitHub
parent 517748bcac
commit eaae7267fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -227,9 +227,9 @@ namespace Gala {
#if HAS_MUTTER336
Cogl.VertexP2T2C4 vertices[4];
vertices[0] = { x, y + height, 0, 1, 255, 255, 255, backdrop_opacity };
vertices[0] = { x, y + height, 0, 1, backdrop_opacity, backdrop_opacity, backdrop_opacity, backdrop_opacity };
vertices[1] = { x, y, 0, 0, 0, 0, 0, 0 };
vertices[2] = { x + width, y + height, 1, 1, 255, 255, 255, backdrop_opacity };
vertices[2] = { x + width, y + height, 1, 1, backdrop_opacity, backdrop_opacity, backdrop_opacity, backdrop_opacity };
vertices[3] = { x + width, y, 1, 0, 0, 0, 0, 0 };
var primitive = new Cogl.Primitive.p2t2c4 (context.get_framebuffer ().get_context (), Cogl.VerticesMode.TRIANGLE_STRIP, vertices);

View File

@ -63,9 +63,10 @@ namespace Gala {
path.rectangle (0, 0, width, height);
context.get_framebuffer ().stroke_path (pipeline, path);
path = new Cogl.Path ();
pipeline.set_color4ub (255, 255, 255, 25);
path.rectangle (0, 0, width, height);
var color = Cogl.Color.from_4ub (255, 255, 255, 25);
color.premultiply ();
pipeline.set_color (color);
path.rectangle (0.5f, 0.5f, width - 1, height - 1);
context.get_framebuffer ().stroke_path (pipeline, path);
}
#else