mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 18:30:08 +00:00
rendernode: Handle rotation transforms in opacity calculations
Tests included.
This commit is contained in:
parent
5f719c8ea3
commit
83c2766e3f
@ -3625,7 +3625,7 @@ gsk_transform_node_get_opaque_rect (GskRenderNode *node,
|
||||
GskTransformNode *self = (GskTransformNode *) node;
|
||||
graphene_rect_t child_opaque;
|
||||
|
||||
if (gsk_transform_get_category (self->transform) < GSK_TRANSFORM_CATEGORY_2D_AFFINE)
|
||||
if (gsk_transform_get_fine_category (self->transform) < GSK_FINE_TRANSFORM_CATEGORY_2D_DIHEDRAL)
|
||||
return FALSE;
|
||||
|
||||
if (!gsk_render_node_get_opaque_rect (self->child, &child_opaque))
|
||||
|
32
testsuite/gsk/opaque/transform-flip-0-0-100-100.node
Normal file
32
testsuite/gsk/opaque/transform-flip-0-0-100-100.node
Normal file
@ -0,0 +1,32 @@
|
||||
container {
|
||||
transform {
|
||||
transform: scale(1,1);
|
||||
child: color {
|
||||
bounds: 50 50 50 50;
|
||||
color: lime;
|
||||
}
|
||||
}
|
||||
transform {
|
||||
transform: scale(1,-1);
|
||||
child: color {
|
||||
bounds: 50 -50 50 50;
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
}
|
||||
container {
|
||||
transform {
|
||||
transform: scale(-1,-1);
|
||||
child: color {
|
||||
bounds: -50 -50 50 50;
|
||||
color: yellow;
|
||||
}
|
||||
}
|
||||
transform {
|
||||
transform: scale(-1,1);
|
||||
child: color {
|
||||
bounds: -50 50 50 50;
|
||||
color: blue;
|
||||
}
|
||||
}
|
||||
}
|
28
testsuite/gsk/opaque/transform-rotate-0-0-200-50.node
Normal file
28
testsuite/gsk/opaque/transform-rotate-0-0-200-50.node
Normal file
@ -0,0 +1,28 @@
|
||||
transform {
|
||||
transform: rotate(0);
|
||||
child: color {
|
||||
bounds: 0 0 50 50;
|
||||
color: lime;
|
||||
}
|
||||
}
|
||||
transform {
|
||||
transform: rotate(90);
|
||||
child: color {
|
||||
bounds: 0 -100 50 50;
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
transform {
|
||||
transform: rotate(180);
|
||||
child: color {
|
||||
bounds: -150 -50 50 50;
|
||||
color: yellow;
|
||||
}
|
||||
}
|
||||
transform {
|
||||
transform: rotate(270);
|
||||
child: color {
|
||||
bounds: -50 150 50 50;
|
||||
color: blue;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user