绘图-基本体#
arcade.draw_arc_filled#
- arcade.draw_arc_filled(center_x: float, center_y: float, width: float, height: float, color: Union[Tuple[int, int, int], List[int], Tuple[int, int, int, int]], start_angle: float, end_angle: float, tilt_angle: float = 0, num_segments: int = 128)[源代码]#
绘制一条实心圆弧。用于绘制馅饼楔形或Pac-Man。
- 参数
center_x (float) -- 作为圆弧中心的X位置。
center_y (float) -- 作为圆弧中心的Y位置。
width (float) -- 弧线的宽度。
height (float) -- 弧线的高度。
color (Color) -- 颜色,以RGB或RGBA格式在3个或4个字节的列表中指定。
start_angle (float) -- 圆弧的起点角度(以度为单位)。
end_angle (float) -- 圆弧的终点角度,以度为单位。
tilt_angle (float) -- 角度弧线是倾斜的。
num_segments (float) -- 用于绘制圆弧的线段数。
arcade.draw_arc_outline#
- arcade.draw_arc_outline(center_x: float, center_y: float, width: float, height: float, color: Union[Tuple[int, int, int], List[int], Tuple[int, int, int, int]], start_angle: float, end_angle: float, border_width: float = 1, tilt_angle: float = 0, num_segments: int = 128)[源代码]#
绘制圆弧的外边。对于绘制曲线非常有用。
- 参数
center_x (float) -- 作为圆弧中心的X位置。
center_y (float) -- 作为圆弧中心的Y位置。
width (float) -- 弧线的宽度。
height (float) -- 弧线的高度。
color (Color) -- 颜色,以RGB或RGBA格式在3个或4个字节的列表中指定。
start_angle (float) -- 圆弧的起点角度(以度为单位)。
end_angle (float) -- 圆弧的终点角度,以度为单位。
border_width (float) -- 以像素为单位的线条宽度。
tilt_angle (float) -- 角度弧线是倾斜的。
num_segments (int) -- 组成此圆的三角形线段的浮动。越高,质量越好,但渲染时间越慢。
arcade.draw_circle_filled#
arcade.draw_circle_outline#
- arcade.draw_circle_outline(center_x: float, center_y: float, radius: float, color: Union[Tuple[int, int, int], List[int], Tuple[int, int, int, int]], border_width: float = 1, tilt_angle: float = 0, num_segments: int = - 1)[源代码]#
画一个圆的轮廓。
- 参数
center_x (float) -- 作为圆中心的X位置。
center_y (float) -- Y位置,即圆的中心。
radius (float) -- 圆的宽度。
color (Color) -- 颜色,以RGB或RGBA格式在3个或4个字节的列表中指定。
border_width (float) -- 圆形轮廓的宽度,以像素为单位。
tilt_angle (float) -- 角度(以度为单位)以倾斜圆。适用于低段数圆
num_segments (int) -- 组成此圆的三角形线段的数量。越高,质量越好,但渲染时间越慢。默认值-1表示Arcade将尝试根据圆的大小计算合理数量的线段。
arcade.draw_ellipse_filled#
arcade.draw_ellipse_outline#
- arcade.draw_ellipse_outline(center_x: float, center_y: float, width: float, height: float, color: Union[Tuple[int, int, int], List[int], Tuple[int, int, int, int]], border_width: float = 1, tilt_angle: float = 0, num_segments: int = - 1)[源代码]#
画出椭圆的轮廓。
- 参数
center_x (float) -- 作为圆中心的X位置。
center_y (float) -- Y位置,即圆的中心。
width (float) -- 椭圆的宽度。
height (float) -- 椭圆的高度。
color (Color) -- 颜色,以RGB或RGBA格式在3个或4个字节的列表中指定。
border_width (float) -- 圆形轮廓的宽度,以像素为单位。
tilt_angle (float) -- 倾斜椭圆的角度(以度为单位)。
num_segments (int) -- 组成此圆的三角形线段的数量。越高,质量越好,但渲染时间越慢。默认值-1表示Arcade将尝试根据圆的大小计算合理数量的线段。
tilt_angle -- 圆圈的平铺。在绘制线段数较低的圆时非常有用
arcade.draw_line#
arcade.draw_line_strip#
arcade.draw_lines#
- arcade.draw_lines(point_list: Sequence[Union[Tuple[float, float], List[float]]], color: Union[Tuple[int, int, int], List[int], Tuple[int, int, int, int]], line_width: float = 1)[源代码]#
画一组线。
在指定的每一对点之间画一条线。
- 参数
point_list (PointList) -- 组成直线的点的列表。每一点都在一个列表中。所以这是一份清单清单。
color (Color) -- 颜色,以RGB或RGBA格式在3个或4个字节的列表中指定。
line_width (float) -- 以像素为单位的线条宽度。
arcade.draw_lrtb_rectangle_filled#
arcade.draw_lrtb_rectangle_outline#
arcade.draw_lrwh_rectangle_textured#
arcade.draw_parabola_filled#
arcade.draw_parabola_outline#
arcade.draw_point#
arcade.draw_points#
- arcade.draw_points(point_list: Sequence[Union[Tuple[float, float], List[float]]], color: Union[Tuple[int, int, int], List[int], Tuple[int, int, int, int]], size: float = 1)[源代码]#
绘制一组点。
- 参数
point_list (PointList) -- 点的列表每个点都在列表中。所以这是一份清单清单。
color (Color) -- 颜色,以RGB或RGBA格式在3个或4个字节的列表中指定。
size (float) -- 以像素为单位的点大小。
arcade.draw_polygon_filled#
arcade.draw_polygon_outline#
- arcade.draw_polygon_outline(point_list: Sequence[Union[Tuple[float, float], List[float]]], color: Union[Tuple[int, int, int], List[int], Tuple[int, int, int, int]], line_width: float = 1)[源代码]#
绘制一个多边形轮廓。也被称为“线循环”。
- 参数
point_list (PointList) -- 组成直线的点的列表。每一点都在一个列表中。所以这是一份清单清单。
color (Color) -- 颜色,以RGB或RGBA格式在3个或4个字节的列表中指定。
line_width (int) -- 以像素为单位的线条宽度。