Arcade inbuilt functions to draw polygon in Python3
The arcade library is a high-tech Python Package with advanced set of tools for making 2D games with gripping graphics and sound. It is Object-oriented and is especially built for Python 3.6 and above versions.
Arcade has two inbuilt functions for drawing a polygon:
1. arcade.draw_polygon_outline( ) : This function is used to draw the outline of the polygon.
Syntax: arcade.draw_polygon_outline (point_list, color, line_width )
- point_list: List of points making up the lines. Each point is in a list. So it is a list of lists.
- color (Color): specify color using arcade.color.COLOR NAME. (Note that color name should in Capital letters.)
- line_width:- Width of the line in pixels.
2. arcade.draw_polygon_filled( ): This inbuilt function of arcade is used to draw polygon filled with color.
Syntax: arcade.draw_polygon_filled (point_list, color )
- point_list- It is basically List of points where each point is in a list. So it is a list of lists.
- Color – specify color using arcade.color.COLOR NAME. (Note that color name should in Capital letters. )
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course