Results 1 to 6 of 6
Like Tree1Likes
  • 1 Post By DarrylBurke

Thread: Something other than Point to indicate a translation?

  1. #1
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Something other than Point to indicate a translation?

    I'm using java.awt.Point as the return type of a method to indicate a [edit: relative] x, y translation. Its fields fit the bill, but is there another class in the standard API that would be more appropriate for this purpose?
    Last edited by kjkrum; 07-31-2012 at 01:21 AM.
    Get in the habit of using standard Java naming conventions!

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,242
    Rep Power
    19

    Default Re: Something other than Point to indicate a translation?

    Dimension?

    db
    kjkrum likes this.
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    7

    Default Re: Something other than Point to indicate a translation?

    I'm not entirely sure what you are looking for, or what you wish to translate. An AffineTransform can be used to specify a translation (and then some), and can be used directly to transform java2D point(s), or indirectly if you are using Swing by applying the transform to a Graphics2D. It seems more mathematically sound than using a point, as it is a transformation matrix

  4. #4
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: Something other than Point to indicate a translation?

    Hmm. I think I'm going to stick with Point, unless I decide to write my own immutable replacement.
    Get in the habit of using standard Java naming conventions!

  5. #5
    shahid nx is offline Member
    Join Date
    Aug 2012
    Posts
    2
    Rep Power
    0

    Default Re: Something other than Point to indicate a translation?

    please tell me how to create new post in this forum i m not seeing that option

  6. #6
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default Re: Something other than Point to indicate a translation?

    @shahid nx: Click here

    But wait! Before you do that read this: There is a button saying "+Post New Thread" near the upper left corner.

Similar Threads

  1. Compilator translation
    By claudiocarcaci in forum Advanced Java
    Replies: 14
    Last Post: 07-31-2012, 12:40 PM
  2. Java Translation
    By hello_world in forum New To Java
    Replies: 6
    Last Post: 02-09-2012, 12:14 PM
  3. Language translation
    By archanaanbu in forum Java Applets
    Replies: 0
    Last Post: 02-09-2011, 05:21 AM
  4. WORD Translation HELP PLZ :(
    By sammypants in forum New To Java
    Replies: 2
    Last Post: 11-24-2009, 01:46 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
  •