RectOut
-
- Posts: 220
- Joined: 23 Jan 2012, 17:07
- Location: Round Rock, TX
RectOut
The documentation for RectOut says that the first 2 parameters specify the "The x/y value for the top left corner of the rectangle." It sure appears to me to be the bottom left corner. (Unless I'm messed up, again. )
McSummation aka James
http://www.mcsummation.com/Mindstorms/
http://www.mcsummation.com/Mindstorms/
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: RectOut
It's probably just a documentation error. It wouldn't be the first or last.
Basically any x,y position on the NXT LCD starts at bottom left (because of the way the buffer is set up).
Basically any x,y position on the NXT LCD starts at bottom left (because of the way the buffer is set up).
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Re: RectOut
Well, not unless you frequently put in negative values for the width and height.
Commit to LEGO Mindstorms Robotics Stack Exchange:
bit.ly/MindstormsSE
Commit to LEGO Stack Exchange: bit.ly/Area51LEGOcommit
Re: RectOut
Except on a circle, the X and Y start at the origin of the circle.mattallen37 wrote:It's probably just a documentation error. It wouldn't be the first or last.
Basically any x,y position on the NXT LCD starts at bottom left (because of the way the buffer is set up).
Thanks, and have a nice day,
nxtboy III
programnxt.com
nxtboy III
programnxt.com
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: RectOut
Which is the only exception I can remember (other than custom polygons, where you can do it however you want).
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Re: RectOut
And Ellipses. Which is weird, since I can't do ellipses with a diameter of an even number.mattallen37 wrote:Which is the only exception I can remember (other than custom polygons, where you can do it however you want).
Commit to LEGO Mindstorms Robotics Stack Exchange:
bit.ly/MindstormsSE
Commit to LEGO Stack Exchange: bit.ly/Area51LEGOcommit
Re: RectOut
mattallen wrote:Basically any x,y position on the NXT LCD starts at bottom left (because of the way the buffer is set up).
the x,y position ALWAYS starts counting at display zero which is at the bottom left corner on the NXT screen.nxtboy3 wrote:Except on a circle, the X and Y start at the origin of the circle.
Also the ccordinates of the center of circles or the foci of ellipses start counting at the bottom left, they simply are relativ to this universal display zero point.
Just the sizes, diameters, or vertizes are related to different start points (relative or absolute).
That makes the definition of a square look a little weird compared to a triangle, a quadrangle, or a polygone.
But again: display zero is ALWAYS bottom left on the NXT, without any exception :D
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: RectOut
Yes, EllipseOut is like CircleOut. Actually, the FW uses the same function. "CircleOut" just calls "EllipseOut", using radius for both horz. and vert. "radii".
What do you mean about not being able to use Ellipses with even numbers?
@Helmut, we aren't talking about the LCD cords. We are talking about the x,y position passed into the draw functions, compared to where the pixels are actually placed on the screen.
What do you mean about not being able to use Ellipses with even numbers?
@Helmut, we aren't talking about the LCD cords. We are talking about the x,y position passed into the draw functions, compared to where the pixels are actually placed on the screen.
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Re: RectOut
actually I suspect some of you (especially nxtboy3) are confusing passing start points and sizes or radii vs. relative vertizes by counting from the zero point which is always bottom left.
Re: RectOut
Well, Excuse ME!!doc-helmut wrote:(especially nxtboy3)
Thanks, and have a nice day,
nxtboy III
programnxt.com
nxtboy III
programnxt.com
Who is online
Users browsing this forum: No registered users and 17 guests