画快乐笑脸示例

"""
画快乐笑脸示例

"""

import arcade

# 设置屏幕的常量
SCREEN_WIDTH = 600      # 宽度
SCREEN_HEIGHT = 600     # 高度
SCREEN_TITLE = "画快乐笑脸示例,lixingqiu.com"

# 打开窗口
arcade.open_window(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE)

# 设置背景颜色
arcade.set_background_color(arcade.color.WHITE)

# 开始渲染
arcade.start_render()

# 画圆
x = 300; y = 300; radius = 200
arcade.draw_circle_filled(x, y, radius, arcade.color.YELLOW)

# 画右眼睛
x = 370; y = 350; radius = 20
arcade.draw_circle_filled(x, y, radius, arcade.color.BLACK)

# 画左眼睛
x = 230; y = 350; radius = 20
arcade.draw_circle_filled(x, y, radius, arcade.color.BLACK)

# 画微笑(弧)
x = 300; y = 280; width = 120; height = 100
start_angle = 190; end_angle = 350
arcade.draw_arc_outline(x, y, width, height, arcade.color.BLACK,
                        start_angle, end_angle, 10)

# 结束渲染显示结果
arcade.finish_render()


# 运行循环
arcade.run()