GDI+ offers a matrix object that can be applied to various other GDI+ objects. One of those is the Graphics object (similar to GDI's hDC). With a matrix, we can simultaneously scale, rotate, shear & offset/translate a rendering in basically one call.
The attached offers such options in a simple sample project. The matrix is created and can be cached for all future rendering, unless of course something changes and the matrix should be recreated. What's kind of neat is that an inverted copy of the matrix can be used for hit testing on the rotated, scaled, sheared, translated rendering relative to the original object, un-rotated, un-scaled, un-sheared, un-translated.
Please read the comments included in the code, especially within the pvCreateDisplayMatrix routine, before asking questions about the code
Image may be NSFW.
Clik here to view.
The attached offers such options in a simple sample project. The matrix is created and can be cached for all future rendering, unless of course something changes and the matrix should be recreated. What's kind of neat is that an inverted copy of the matrix can be used for hit testing on the rotated, scaled, sheared, translated rendering relative to the original object, un-rotated, un-scaled, un-sheared, un-translated.
Please read the comments included in the code, especially within the pvCreateDisplayMatrix routine, before asking questions about the code
Image may be NSFW.
Clik here to view.
