View: provide the transform between different coordinate spaces

There's currently no way for an application to convert between view and
drawing coordinates with a drawing states stack without keeping track of
all the transformations itself, which is not very convenient for helper
or library functions.

Handle other spaces too, for good measure.

Change-Id: Ic8404a1c111e273fff1eebf2f9f59f58246b796c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5775
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Máximo Castañeda
2022-11-13 04:04:30 +00:00
committed by waddlesplash
parent 423e3645e1
commit 241f109ccb
7 changed files with 199 additions and 4 deletions
+1
View File
@@ -358,6 +358,7 @@ enum {
// transformation in addition to origin/scale
AS_VIEW_SET_TRANSFORM,
AS_VIEW_GET_TRANSFORM,
AS_VIEW_GET_PARENT_COMPOSITE,
AS_VIEW_AFFINE_TRANSLATE,
AS_VIEW_AFFINE_SCALE,