Results 1 to 2 of 2
Thread: graphics transformations
- 06-09-2010, 08:27 PM #1Member
- Join Date
- Feb 2010
- Rep Power
- 02-03-2011, 11:43 AM #2kevinpeter Guest
One of the most exiting things that you can do with GDI is transform the graphics output using a matrix. This powerful tool enables you to zoom, pan, scale, mirror and rotate the stuff you draw to create really cool effects. Using the matrix transforms can also be frustrating for the novice user because they are not intuitively easy to understand and obtaining the desired result can often be only after significant trial and error.
A transform applied to a Graphics object affects all of the pixels output to the graphics surface. After applying a transform, all text and graphics will be affected in the same way until the transform is modified again. You can mix effects by creating a transform, doing some drawing, creating another transform, doing more drawing and so-on.
All graphics output goes through a series of transforms called the Graphics pipeline. Each pixel drawn in world coordinate space will be transformed by the current Graphics transform, then by the page-coordinate transform and finally by the device coordinate transform. While you have no control over the device transform and only rudimentary control over the page transform you have complete control over the initial graphics transform.
- By Java Tip in forum java.awtReplies: 0Last Post: 06-21-2008, 09:50 PM