Information générale
Titre:
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement