forked from AuroraMiddleware/gtk
transform: Treat 0 perspective transforms as identity
This happens if you apply a perspective transform and its inverse, which is the negative version of the perspective.
This commit is contained in:
parent
22e0785802
commit
69629ebb1a
@ -1118,7 +1118,7 @@ gsk_perspective_transform_to_matrix (GskTransform *transform,
|
|||||||
GskPerspectiveTransform *self = (GskPerspectiveTransform *) transform;
|
GskPerspectiveTransform *self = (GskPerspectiveTransform *) transform;
|
||||||
float f[16] = { 1.f, 0.f, 0.f, 0.f,
|
float f[16] = { 1.f, 0.f, 0.f, 0.f,
|
||||||
0.f, 1.f, 0.f, 0.f,
|
0.f, 1.f, 0.f, 0.f,
|
||||||
0.f, 0.f, 1.f, -1.f / self->depth,
|
0.f, 0.f, 1.f, self->depth ? -1.f / self->depth : 0.f,
|
||||||
0.f, 0.f, 0.f, 1.f };
|
0.f, 0.f, 0.f, 1.f };
|
||||||
|
|
||||||
graphene_matrix_init_from_float (out_matrix, f);
|
graphene_matrix_init_from_float (out_matrix, f);
|
||||||
|
Loading…
Reference in New Issue
Block a user