Results 1 to 2 of 2
  1. #1
    deepthought is offline Member
    Join Date
    Feb 2010
    Posts
    10
    Rep Power
    0

    Default graphics transformations

    does anybody know how to to transform a square graphic into a trapezoid? i want the texture to distort to match the shape.
    Jocks rule the highschools, but GEEKS RULE THE WORLD MWAHAHAHA!!

  2. #2
    kevinpeter Guest

    Default

    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.

Similar Threads

  1. A demonstration of Java2D transformations
    By Java Tip in forum java.awt
    Replies: 0
    Last Post: 06-21-2008, 08:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •