Description:
Draws an ellipse that fits perfectly inside the specified rectangular
area on the given surface. The ellipse can be rendered as either an
outlined shape or a filled shape depending on the width
parameter. This method is commonly used for buttons, highlights,
indicators, and decorative UI elements.
from VertexEngine import VertexScreen
vs = VertexScreen()
# Draw a filled ellipse
vs.Draw.ellipse(
surface,
(255, 200, 0),
rect=(100, 150, 300, 180),
width=0
)
surface (Surface):
The surface on which the ellipse will be drawn, such as the main
display surface or an off-screen rendering buffer.
color (tuple):
The RGB color of the ellipse, specified as (R, G, B).
rect (tuple):
A rectangle defined as (x, y, width, height) that
determines the size and position of the ellipse.
width (int):
The thickness of the ellipse outline in pixels. Set to
0 to draw a filled ellipse.
None — This method draws directly onto the surface and does not return a value.
width = 0) are useful for UI backgrounds.