This is very very useful, however the proposed set is not really correct:

+enum weston_matrix_transform_type {
+       WESTON_MATRIX_TRANSFORM_TRANSLATE       = (1 << 0),
+       WESTON_MATRIX_TRANSFORM_SCALE           = (1 << 1),
+       WESTON_MATRIX_TRANSFORM_ROTATE          = (1 << 2),
+       WESTON_MATRIX_TRANSFORM_OTHER           = (1 << 3),
+};

These either have misleading names or are not really useful (translate will probably be true in all cases, things that can do rotate can usually do skew, does scale include reflections, etc).

Useful things to know about the current transform (a,b,c,d,x,y are the 2x3 affine matrix):

 - Are x and y integers?

- If it is a 90 degree rotation or reflection (meaning either b and c are zero, or a and d are zero).

 - No scaling: abs(ad-bc) == 1.

 - No perspective (third column of 3x3 matrix is 0, 0, 1).

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to