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:
committed by
waddlesplash
parent
423e3645e1
commit
241f109ccb
@@ -66,7 +66,5 @@
|
||||
All drawing operations in a BView use coordinates specified in the drawing space.
|
||||
However, the update rect passed to the Draw method (or passed to the Invalidate
|
||||
method) is in the BView base coordinate space. Conversion between the two can
|
||||
be done using the affine transform returned by BView::Transform, or in case the
|
||||
legacy transformation functions are used, by applying the scale and origin returned
|
||||
by the Scale() and Origin() functions.
|
||||
be done using the affine transform returned by BView::TransformTo.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user