![]() |
VOOZH | about |
In this article we will see how we can draw arc on window in PYGLET module in python. Pyglet is easy to use but powerful library for developing visually rich GUI applications like games, multimedia etc. A window is a "heavyweight" object occupying operating system resources. Windows may appear as floating regions or can be set to fill an entire screen (fullscreen). An arc is a portion of the circumference of a circle. In the figure above, the arc is the blue part of the circle. Strictly speaking, an arc could be a portion of some other curved shape, such as an ellipse, but it almost always refers to a circle. Arc is drawn with the help of shapes module in pyglet.
We can create a window with the help of command given below
# creating a window window = pyglet.window.Window(width, height, title)
In order to create window we use Arc method with pyglet.shapes
Syntax : shapes.Arc(arc_x, arc_y, size_arc, segments, angle, color, batch=batch)
Argument : It takes first two integer i.e arc position, third integer as size, fourth is integer i.e segments, fifth is float i.e angle, sixth is color and last is batch object
Return : It returns Arc object
Below is the implementation
Output :