This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Rectangle constructor ?

 
Pin Ting
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all ranchers,
I read this in the Java SE 1.4.1 API doc:
======================================================
Rectangle(int x, int y, int width, int height)
Constructs a new Rectangle whose top-left corner is specified as (x, y) and whose width and height are specified by the arguments of the same name.
======================================================
But I found the first two args really represent the "bottom-left" corner of the rectangle. What's the coordinate convention in Java library? Do I mistake something?
Regards,
Pin Ting
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might be confused because in Java, as in most computer graphics environments, (0, 0) is the upper left corner of the screen, not the lower left, and increasing the Y coordinate moves downward -- the oppposite of a "normal" Cartesian coordinate system.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic