0

So when we are drawing a rectangle in java

g.drawRect(X, Y, 100, 10);

Is the rectangle formed from the top left corner and goes 100 units to the right and 10 down, or is there a center (X,Y) which extends 50 units to the left and right and 5 units to the top and bottom?

MadProgrammer
348k22 gold badges243 silver badges379 bronze badges
asked Jun 27, 2014 at 1:20
2
  • What about a circle, how does that work? Commented Jun 27, 2014 at 1:27
  • Perhaps you should try reading the JavaDocs Commented Jun 27, 2014 at 1:40

1 Answer 1

1

The rectangle is formed from the top left corner and goes 100 units to the right and 10 down

answered Jun 27, 2014 at 1:22
Sign up to request clarification or add additional context in comments.

1 Comment

I know you're right, but can you sight evidence for that claim ;)

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.