draw_text ( "draw_arc/filled_arc", 123, 3, arcade. BLACK_BEAN, 45 ) # Draw an arc, and another one rotated arcade. draw_text ( "draw_ellipse_filled", 3, 3, arcade. BLACK_BEAN, 3, 45 ) # Draw a filled ellipse, and another one rotated arcade. draw_text ( "draw_ellipse_outline", 483, 207, arcade. GREEN ) # Draw an ellipse outline, and another one rotated arcade. draw_text ( "draw_circle_filled", 363, 207, arcade. WISTERIA, 3 ) # Draw a filled in circle arcade. draw_text ( "draw_circle_outline", 243, 207, arcade. SPANISH_VIOLET ) # Draw an outline of a circle arcade. draw_polygon_filled ( point_list, arcade. draw_text ( "draw_polygon_filled", 123, 207, arcade. SPANISH_VIOLET, 3 ) # Draw a filled in polygon arcade. draw_polygon_outline ( point_list, arcade. draw_text ( "draw_polygon_outline", 3, 207, arcade. TROPICAL_RAIN_FOREST, 3 ) # Draw a polygon arcade. WOOD_BROWN, 3 ) # Draw a set of lines arcade. RED, 10 ) # Draw a set of points arcade. draw_text ( "draw_point", 3, 405, arcade. BLACK, 2 ) # Draw horizontal lines every 200 pixels for y in range ( 0, 601, 200 ): arcade. start_render () # Draw a grid # Draw vertical lines every 120 pixels for x in range ( 0, 601, 120 ): arcade. This must be done before any drawing commands. open_window ( 600, 600, "Drawing Primitives Example" ) # Set the background color to white # For a list of named colors see # Colors can also be specified in (red, green, blue) format and # (red, green, blue, alpha) format. Set the window title and dimensions (width and height) arcade. If this fails, then try following the instructions # for how to install arcade: # import arcade # Open the window. API documentation for the draw commands can be found here: A video explaining this example can be found here: If Python and Arcade are installed, this example can be run from the command line with: python -m _primitives """ # Import the Arcade library. It does not assume the programmer knows how to define functions or classes yet. This example shows the drawing primitives and how they are used.
0 Comments
Leave a Reply. |