Results 1 to 2 of 2
  1. #1
    cvillejin is offline Member
    Join Date
    Apr 2011
    Posts
    6
    Rep Power
    0

    Default Java - Image Rotation - How to use this code?

    Hi, can someone please tell me how to use this code? I can't seem to get it to work. Can you give like example with values? :



    rotate

    public abstract void rotate(double theta,
    double x,
    double y)

    Concatenates the current Graphics2D Transform with a translated rotation transform. Subsequent rendering is transformed by a transform which is constructed by translating to the specified location, rotating by the specified radians, and translating back by the same amount as the original translation. This is equivalent to the following sequence of calls:

    translate(x, y);
    rotate(theta);
    translate(-x, -y);


    Rotating with a positive angle theta rotates points on the positive x axis toward the positive y axis.

    Parameters:
    theta - the angle of rotation in radians
    x - the x coordinate of the origin of the rotation
    y - the y coordinate of the origin of the rotation

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

Similar Threads

  1. Image rotation problem, plz help
    By brigadier90 in forum Java 2D
    Replies: 5
    Last Post: 01-15-2013, 12:01 AM
  2. Image Rotation
    By mix99 in forum AWT / Swing
    Replies: 1
    Last Post: 02-24-2010, 10:25 AM
  3. Code for image to binary
    By Deva in forum New To Java
    Replies: 3
    Last Post: 12-24-2009, 04:48 PM
  4. Sample Code to Scan an Image
    By LankanSniper in forum Advanced Java
    Replies: 0
    Last Post: 03-24-2009, 02:54 PM
  5. Rotation in java 3D
    By émilie- in forum Java Applets
    Replies: 0
    Last Post: 02-13-2008, 10:37 AM

Posting Permissions

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