def draw_electrode(x, y): # Draw BottomElectrode arcade.draw_circle_filled(x, y, 75, arcade.color.RED) # Draw TopElectrode arcade.draw_parabola_filled(x - 37.5, y - 75, 37.5 + x, 75, arcade.color.WHITE)
def draw_textstage1(): # Draw Textbox One arcade.draw_rectangle_filled(200, 140, 200, 50, arcade.color.WHITE) # Draw Outline One arcade.draw_rectangle_outline(200, 140, 200, 50, arcade.color.BLACK, 5) # Write Text One arcade.draw_text("What will Electrode do?", 110, 140, arcade.color.BLUE, 15) # Draw Textbox Two arcade.draw_rectangle_filled(450, 150, 240, 100, arcade.color.WHITE) # Draw Outline Two arcade.draw_rectangle_outline(450, 150, 240, 100, arcade.color.BLACK, 5) # Write Text Two arcade.draw_text("FIGHT BAG", 335, 155, arcade.color.BLUE, 25) # Write Text TwoTwo arcade.draw_text("POKéMON RUN", 335, 115, arcade.color.BLUE, 25) # Draw Stage1 arcade.draw_parabola_filled(135, 140, 250, 35, arcade.color.DARK_GREEN)
def draw(self): """ Draw the missile on the screen :return: """ arcade.draw_parabola_filled(self.center.x, self.center.y, self.center.x + 5, self.radius * 3, arcade.color.RED_DEVIL, self.tilt)
def on_draw(self): """Called whenever we need to draw our window """ # Clear the screen and start drawing arcade.start_render() # Draw a blue arc arcade.draw_arc_filled(100, 100, 40, 40, arcade.color.BLUE, 0, 125) # Draw a red ellipse arcade.draw_ellipse_outline(300, 100, 60, 30, arcade.color.RED, border_width=2) # Draw some purple lines arcade.draw_line(500, 100, 550, 100, arcade.color.PURPLE) arcade.draw_line(500, 90, 550, 90, arcade.color.PURPLE, line_width=2) arcade.draw_line(500, 80, 550, 80, arcade.color.PURPLE, line_width=3) # Draw an orange parabola arcade.draw_parabola_filled(100, 100, 130, 120, arcade.color.ORANGE) # Draw a black point arcade.draw_point(300, 300, arcade.color.BLACK, 20) # Draw a green polygon points_list = [ [500, 300], [550, 300], [575, 325], [550, 350], [525, 340], ] arcade.draw_polygon_outline(points_list, arcade.color.GREEN, line_width=5) # Draw some rectangles arcade.draw_rectangle_filled(100, 500, 150, 75, arcade.color.AZURE) arcade.draw_lrtb_rectangle_filled(150, 250, 575, 525, arcade.color.AMARANTH_PINK) arcade.draw_xywh_rectangle_filled(200, 550, 150, 75, arcade.color.ASPARAGUS) # Draw some triangles arcade.draw_triangle_filled(400, 500, 500, 500, 450, 575, arcade.color.DEEP_RUBY)
def draw_koffing(x, y): # Draw KoffingBody arcade.draw_circle_filled(450, y, 85, arcade.color.PURPLE) # Draw KoffingEye1 arcade.draw_parabola_filled(410, 20 + y, 430, 15, arcade.color.WHITE) # Draw KoffingEye2 arcade.draw_parabola_filled(470, 20 + y, 490, 15, arcade.color.WHITE) # Draw KoffingEyeLine1 arcade.draw_parabola_outline(410, 20 + y, 430, 15, arcade.color.BLACK, 2) # Draw KoffingEyeLine2 arcade.draw_parabola_outline(470, 20 + y, 490, 15, arcade.color.BLACK, 2) # Draw KoffingPupil1 arcade.draw_circle_filled(420, 42 + y, 4, arcade.color.BLACK) # Draw KoffingPupil2 arcade.draw_circle_filled(480, 42 + y, 4, arcade.color.BLACK) # Draw KoffingMouth arcade.draw_parabola_filled(420, 50 + y, 480, -35, arcade.color.PINK) # Draw KoffingFang1 arcade.draw_triangle_filled(400, 15 + y, 420, y + 15, 410, y - 5, arcade.color.WHITE) # Draw KoffingFang2 arcade.draw_triangle_filled(480, 15 + y, 500, y + 15, 490, y - 5, arcade.color.WHITE) # Draw KoffingCircle arcade.draw_ellipse_outline(450, y - 40, 25, 15, arcade.color.WHITE, 5) # Draw KoffingX1 arcade.draw_line(440, y - 75, 460, y - 55, arcade.color.WHITE, 3) # Draw KoffingX2 arcade.draw_line(460, y - 75, 440, y - 55, arcade.color.WHITE, 3)
def game_loop(): # import global variables here. global circle_x global circle_y global circle_radius global count global count1 # update your variables here. text = 20 # Draw things here. arcade.start_render() arcade.draw_circle_filled(circle_x, circle_y, circle_radius, arcade.color.RED) arcade.draw_text(('$' + str(count)), 25, 400, arcade.color.GREEN) arcade.draw_text('x x', 640, 400, arcade.color.WHITE) arcade.draw_circle_outline(650, 400, 20, arcade.color.WHITE) arcade.draw_circle_filled( 650, 390, 5, arcade.color.WHITE, ) arcade.draw_text(str(count1), 680, 400, arcade.color.WHITE) if (count == 0): arcade.draw_text( "If you press this button, you will get $5000, but one person dies", 100, 400, arcade.color.WHITE) elif (count > 0 and count < 35000): arcade.draw_text("You're Terrible", 110, 400, arcade.color.WHITE, text) elif (count >= 35000): arcade.draw_parabola_filled(45, 100, 80, 40, arcade.color.CRIMSON) arcade.draw_parabola_filled(25, 120, 45, 20, arcade.color.CRIMSON) arcade.draw_parabola_filled(80, 120, 105, 20, arcade.color.CRIMSON) arcade.draw_circle_filled(100, 135, 10, arcade.color.GRAY) arcade.draw_circle_filled(35, 135, 10, arcade.color.GRAY) arcade.draw_text( "Hey look, you have a little car now, hope you're proud of yourself", 110, 400, arcade.color.WHITE)
import arcade arcade.open_window(600, 600, "Drawing Example") arcade.set_background_color(arcade.csscolor.RED) arcade.start_render() arcade.draw_lrtb_rectangle_filled(0, 599, 300, 0, arcade.csscolor.BEIGE) arcade.draw_rectangle_filled(100, 320, 20, 100, arcade.csscolor.LIME_GREEN) arcade.draw_circle_filled(100, 350, 50, arcade.csscolor.DARK_GREEN) arcade.draw_rectangle_filled(350, 320, 20, 100, arcade.csscolor.LIME_GREEN) arcade.draw_circle_filled(350, 350, 40, arcade.csscolor.BLUE) arcade.draw_rectangle_filled(225, 320, 20, 270, arcade.csscolor.LIME_GREEN) arcade.draw_parabola_filled(170, 320, 280, 100, arcade.csscolor.SKY_BLUE) arcade.draw_text( "How it feels to go outside after working for six hours straight", 150, 230, arcade.color.BLACK, 11) arcade.draw_rectangle_filled(500, 320, 20, 100, arcade.csscolor.LIME_GREEN) arcade.draw_arc_filled(500, 320, 90, 100, arcade.csscolor.YELLOW, 0, 180) arcade.finish_render()
arcade.draw_circle_filled(x, y, radius, arcade.color.BLACK) # Draw the nose x1 = 300 y1 = 505 x2 = 285 y2 = 480 x3 = 315 y3 = 480 arcade.draw_triangle_filled(x1, y1, x2, y2, x3, y3, arcade.color.BLUE) # Draw Cap x1 = 280 y1 = 520 x2 = 320 arcade.draw_parabola_filled(x1, y1, x2, 40, arcade.color.BLACK) # Draw the left ears x1 = 220 y1 = 575 x2 = 235 y2 = 520 x3 = 245 y3 = 540 arcade.draw_triangle_filled(x1, y1, x2, y2, x3, y3, arcade.color.GRAY) # Draw the right ears x1 = 375 y1 = 575 x2 = 355 y2 = 542
def draw_seed(x, y): arcade.draw_parabola_filled(x, y, x + 20, 15, arcade.color.BLACK_OLIVE, 180) arcade.draw_triangle_filled(x, y + 15, x + 20, y + 15, x + 10, y + 35, arcade.color.BLACK_OLIVE)
arcade.start_render() # time to draw the watermelon # first, the rind arcade.draw_lrtb_rectangle_filled(0, 800, 75, 0, arcade.color.GREEN) arcade.draw_lrtb_rectangle_filled(160, 320, 75, 0, arcade.color.DARK_GREEN) arcade.draw_lrtb_rectangle_filled(480, 640, 75, 0, arcade.color.DARK_GREEN) arcade.draw_lrtb_rectangle_filled(0, 800, 80, 75, arcade.color.WHITE) """ all these rectangles are making this drawing a square let's add something fun! """ # Seed 1 arcade.draw_parabola_filled(70, 400, 90, 15, arcade.color.BLACK_OLIVE, 180) arcade.draw_triangle_filled(70, 415, 90, 415, 80, 435, arcade.color.BLACK_OLIVE) # Seed 2 arcade.draw_parabola_filled(170, 250, 190, 15, arcade.color.BLACK_OLIVE, 180) arcade.draw_triangle_filled(170, 265, 190, 265, 180, 285, arcade.color.BLACK_OLIVE) # Seed 3 arcade.draw_parabola_filled(400, 300, 420, 15, arcade.color.BLACK_OLIVE, 180) arcade.draw_triangle_filled(400, 315, 420, 315, 410, 335, arcade.color.BLACK_OLIVE) # Seed 4 arcade.draw_parabola_filled(470, 105, 490, 15, arcade.color.BLACK_OLIVE, 180)
arcade.render_text(text, 250, 300, 30) arcade.finish_render() arcade.quick_run(5) import arcade arcade.open_window(800, 600, "Some shapes Example") arcade.set_background_color(arcade.color.WHITE) arcade.start_render() arcade.draw_circle_filled(100, 100, 50, arcade.color.BLACK_OLIVE) arcade.draw_circle_outline(500, 500, 100, arcade.color.RED) arcade.draw_ellipse_filled(200, 200, 100, 50, arcade.color.BROWN, 100) arcade.draw_ellipse_outline(540, 273, 15, 36, arcade.color.AMBER, 3) arcade.draw_parabola_filled(150, 150, 400, 50, arcade.color.BOTTLE_GREEN) arcade.draw_point(60, 495, arcade.color.RED, 10) point_list = ((165, 495), (165, 480), (165, 465), (195, 495), (195, 480), (195, 465)) arcade.draw_points(point_list, arcade.color.ZAFFRE, 10) point_list = ((150, 240), (165, 240), (180, 255), (180, 285), (165, 300), (150, 300)) arcade.draw_polygon_filled(point_list, arcade.color.SPANISH_VIOLET) arcade.finish_render() arcade.quick_run(2) import arcade
def fire(): arcade.draw_parabola_filled(260, 200, 340, 30, arcade.csscolor.ORANGE_RED) arcade.draw_parabola_filled(320, 200, 280, 40, arcade.csscolor.ORANGE)