ellipseMode()
changes the way an ellipse is drawn from the inputs
Last updated
changes the way an ellipse is drawn from the inputs
Last updated
By default, the x and y inputs refer to the center of the ellipse.
This can be changed using ellipseMode()
, with an input of CENTER, CORNERS, CORNER, or RADIUS.
This is the default mode. The code:
will use (x,y) as the center coordinates and width and height as the dimensions.
This mode is for specifying the coordinates of opposite corners of the ellipse's bounding box. The code:
This mode is for specifying the corner of the ellipse's bounding box together with the width and height. The code:
will use (x,y) as the bottom left corner of the ellipse's bounding box and width and height as the dimensions.
This mode is for specifying the center of the ellipse together with half the width and half the height. The code:
will use (x,y) as the center coordinates and wRadius * 2 and hRadius * 2 as the dimensions.
See ellipse() for examples and more info.
Find these documents helpful? Let the people who made them help your child learn to code at Strivemath!
We'd love to hear your Feedback/Comments here.