diff options
Diffstat (limited to 'src/sna/sna_transform.c')
-rw-r--r-- | src/sna/sna_transform.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/sna/sna_transform.c b/src/sna/sna_transform.c index 644d4045..54852b1f 100644 --- a/src/sna/sna_transform.c +++ b/src/sna/sna_transform.c @@ -114,7 +114,7 @@ sna_get_transformed_coordinates(int x, int y, /** * Returns the un-normalized floating-point coordinates transformed by the given transform. */ -Bool +void sna_get_transformed_coordinates_3d(int x, int y, const PictTransform *transform, float *x_out, float *y_out, float *w_out) @@ -126,13 +126,13 @@ sna_get_transformed_coordinates_3d(int x, int y, } else { int64_t result[3]; - if (!_sna_transform_point(transform, x, y, result)) - return FALSE; - - *x_out = result[0] / 65536.; - *y_out = result[1] / 65536.; - *w_out = result[2] / 65536.; + if (_sna_transform_point(transform, x, y, result)) { + *x_out = result[0] / 65536.; + *y_out = result[1] / 65536.; + *w_out = result[2] / 65536.; + } else { + *x_out = *y_out = 0; + *w_out = 1.; + } } - - return TRUE; } |