Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I would like to know more about the coordinates of a Rectangle, in particular:

  • lower left X
  • lower left Y
  • upper right X
  • upper right Y

Every time, I get confused about how to make dimensions based on these coordinates to draw rectangle.

If possible, can I get a graphical representation briefly about these coordinates positions?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
367 views
Welcome To Ask or Share your Answers For Others

1 Answer

Before someone can explain what the lower-left X, lower-left Y, upper-right X and upper-right Y of a rectangle are about, you need to know about the coordinate system: Where is the Origin (x,y) of a PDF page?

The answer to that question contains all the information you need, except for the graphical representation you are asking for. This is a simple representation of the coordinate system:

enter image description here

The origin of the coordinate system is (0, 0). Positive X values are to the right of the origin, positive Y values are above the origin.

I have drawn a Rectangle and indicates where you can find the lower-left corner (with coordinate (llx, lly)) and the upper-right corner (with coordinate (urx, ury)).

The sides of the rectangle are always in parallel with the X and the Y axis, hence you only need two coordinates to define the rectangle.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...