Results 1 to 4 of 4
  1. #1
    wileedingo is offline Member
    Join Date
    May 2012
    Posts
    2
    Rep Power
    0

    Default why are GObject method params double

    Just learning Java. I'm curious to know why GObject method parameters are in double, not int. As the basic unit of measurement is pixels, it would seem that int would be the natural choice.

    thanks.

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,651
    Blog Entries
    7
    Rep Power
    21

    Default Re: why are GObject method params double

    Maybe those GObjects do their dirty deeds in 'world coordinates'; read about them in the API documentation of the Graphics2D class.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    wileedingo is offline Member
    Join Date
    May 2012
    Posts
    2
    Rep Power
    0

    Default Re: why are GObject method params double

    Thanks, Jos.

    That makes some sense to me, though I find it strange that there's a real mix between methods that specify int parameters and those that use double. You would think they would all be one or the other.

    Al

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,651
    Blog Entries
    7
    Rep Power
    21

    Default Re: why are GObject method params double

    Well, I don't know what a GObject is but it should have a reason for having doubles for parameters and ints; otherwise it would be very inconsistent.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Replies: 2
    Last Post: 09-17-2011, 09:56 PM
  2. hiding passed parameters using window.location.href = 'params' method
    By kulangotski in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 07-01-2011, 12:49 PM
  3. setFont GObject help
    By Hollywood_99 in forum New To Java
    Replies: 5
    Last Post: 10-18-2010, 12:18 AM
  4. SetColor GOBJECT passing a string for color
    By Hollywood_99 in forum New To Java
    Replies: 0
    Last Post: 10-17-2010, 11:25 PM
  5. Replies: 5
    Last Post: 03-21-2009, 09:32 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
  •