General information
Title:
Graphics transformations
Hi all,
I'm experimenting with .NET GDI+ and can't decide the best approach (come to that I can't really decide ANY approach) to solving the following:
I'm using world page transformations to draw objects onto the screen. Following this I need to map the screen mouse position back to the 'untransformed' page to determine which graphics object is currently under the mouse. If all the objects have been drawn using the same matrix (in, for example, a simple pan or zoom operation) then I can invert the matrix and use matrix.TransformPoints() to achieve the result I need.
BUT if different objects have been drawn using different transformations ???
AFAICS I'd need to maintain a list of objects with their respective matrices and invert each one looking for a hit ? Anything more effiicient ?
Regards,
Viv
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only