绘图-批次#
arcade.Shape#
arcade.ShapeElementList#
arcade.create_ellipse#
- arcade.create_ellipse(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 = 32, filled=True) arcade.buffered_draw_commands.Shape [源代码]#
这将创建一个椭圆顶点缓冲区对象(VBO)。
函数用于返回可使用绘制的Shape对象
my_shape.draw()
。不要在Draw方法中创建形状,而是在Setup方法中创建它,然后将其绘制到on_draw
。为了获得更快的性能,可以将多个形状添加到ShapeElementList中并绘制该列表。这使得几乎可以像绘制一个形状一样快速地绘制无限形状。
arcade.create_ellipse_filled#
- arcade.create_ellipse_filled(center_x: float, center_y: float, width: float, height: float, color: Union[Tuple[int, int, int], List[int], Tuple[int, int, int, int]], tilt_angle: float = 0, num_segments: int = 128) arcade.buffered_draw_commands.Shape [源代码]#
创建一个实心椭圆。或者,如果您使用相同的宽度和高度,请将其圈起来。
函数用于返回可使用绘制的Shape对象
my_shape.draw()
。不要在Draw方法中创建形状,而是在Setup方法中创建它,然后将其绘制到on_draw
。为了获得更快的性能,可以将多个形状添加到ShapeElementList中并绘制该列表。这使得几乎可以像绘制一个形状一样快速地绘制无限形状。
arcade.create_ellipse_filled_with_colors#
- arcade.create_ellipse_filled_with_colors(center_x: float, center_y: float, width: float, height: float, outside_color: Union[Tuple[int, int, int], List[int], Tuple[int, int, int, int]], inside_color: Union[Tuple[int, int, int], List[int], Tuple[int, int, int, int]], tilt_angle: float = 0, num_segments: int = 32) arcade.buffered_draw_commands.Shape [源代码]#
绘制一个椭圆,并指定内部/外部颜色。用于进行渐变。
函数用于返回可使用绘制的Shape对象
my_shape.draw()
。不要在Draw方法中创建形状,而是在Setup方法中创建它,然后将其绘制到on_draw
。为了获得更快的性能,可以将多个形状添加到ShapeElementList中并绘制该列表。这使得几乎可以像绘制一个形状一样快速地绘制无限形状。
arcade.create_ellipse_outline#
- arcade.create_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 = 128) arcade.buffered_draw_commands.Shape [源代码]#
创建椭圆的轮廓。
函数用于返回可使用绘制的Shape对象
my_shape.draw()
。不要在Draw方法中创建形状,而是在Setup方法中创建它,然后将其绘制到on_draw
。为了获得更快的性能,可以将多个形状添加到ShapeElementList中并绘制该列表。这使得几乎可以像绘制一个形状一样快速地绘制无限形状。
arcade.create_line#
arcade.create_line_generic#
- arcade.create_line_generic(point_list: Sequence[Union[Tuple[float, float], List[float]]], color: Union[Tuple[int, int, int], List[int], Tuple[int, int, int, int]], shape_mode: int, line_width: float = 1) arcade.buffered_draw_commands.Shape [源代码]#
此函数由使用
create_line_strip
和create_line_loop
,只需更改线条绘制的OpenGL类型。
arcade.create_line_generic_with_colors#
- arcade.create_line_generic_with_colors(point_list: Sequence[Union[Tuple[float, float], List[float]]], color_list: Iterable[Union[Tuple[int, int, int], List[int], Tuple[int, int, int, int]]], shape_mode: int, line_width: float = 1) arcade.buffered_draw_commands.Shape [源代码]#
此函数由使用
create_line_strip
和create_line_loop
,只需更改线条绘制的OpenGL类型。
arcade.create_line_loop#
- arcade.create_line_loop(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)[源代码]#
创建要在稍后渲染的多点线循环。这比DRAW_LINE更快,因为顶点只加载到图形卡一次,而不是每一帧。
- 参数
point_list (PointList) --
color (Color) --
line_width (float) --
- 返回形状
arcade.create_line_strip#
- arcade.create_line_strip(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)[源代码]#
创建稍后要渲染的多点直线。这比DRAW_LINE更快,因为顶点只加载到图形卡一次,而不是每一帧。
在内部,粗线由两个三角形创建。
- 参数
point_list (PointList) --
color (Color) --
line_width (PointList) --
- 返回形状
arcade.create_lines#
- arcade.create_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)[源代码]#
创建要在稍后渲染的多点线循环。这比DRAW_LINE更快,因为顶点只加载到图形卡一次,而不是每一帧。
- 参数
point_list (PointList) --
color (Color) --
line_width (float) --
- 返回形状
arcade.create_lines_with_colors#
arcade.create_polygon#
- arcade.create_polygon(point_list: Sequence[Union[Tuple[float, float], List[float]]], color: Union[Tuple[int, int, int], List[int], Tuple[int, int, int, int]])[源代码]#
绘制一个凸面多边形。这将不会绘制凹面多边形。因此,您可能不想使用此函数。
函数用于返回可使用绘制的Shape对象
my_shape.draw()
。不要在Draw方法中创建形状,而是在Setup方法中创建它,然后将其绘制到on_draw
。为了获得更快的性能,可以将多个形状添加到ShapeElementList中并绘制该列表。这使得几乎可以像绘制一个形状一样快速地绘制无限形状。
- 参数
point_list (PointList) --
color --
- 返回形状
arcade.create_rectangle#
- arcade.create_rectangle(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, filled=True) arcade.buffered_draw_commands.Shape [源代码]#
此函数使用顶点缓冲区对象创建矩形。
函数用于返回可使用绘制的Shape对象
my_shape.draw()
。不要在Draw方法中创建形状,而是在Setup方法中创建它,然后将其绘制到on_draw
。为了获得更快的性能,可以将多个形状添加到ShapeElementList中并绘制该列表。这使得几乎可以像绘制一个形状一样快速地绘制无限形状。
arcade.create_rectangle_filled#
- arcade.create_rectangle_filled(center_x: float, center_y: float, width: float, height: float, color: Union[Tuple[int, int, int], List[int], Tuple[int, int, int, int]], tilt_angle: float = 0) arcade.buffered_draw_commands.Shape [源代码]#
创建填充矩形。
函数用于返回可使用绘制的Shape对象
my_shape.draw()
。不要在Draw方法中创建形状,而是在Setup方法中创建它,然后将其绘制到on_draw
。为了获得更快的性能,可以将多个形状添加到ShapeElementList中并绘制该列表。这使得几乎可以像绘制一个形状一样快速地绘制无限形状。
arcade.create_rectangle_filled_with_colors#
- arcade.create_rectangle_filled_with_colors(point_list, color_list) arcade.buffered_draw_commands.Shape [源代码]#
此函数使用顶点缓冲区对象创建一个矩形/四边形。
函数用于返回可使用绘制的Shape对象
my_shape.draw()
。不要在Draw方法中创建形状,而是在Setup方法中创建它,然后将其绘制到on_draw
。为了获得更快的性能,可以将多个形状添加到ShapeElementList中并绘制该列表。这使得几乎可以像绘制一个形状一样快速地绘制无限形状。
arcade.create_rectangle_outline#
- arcade.create_rectangle_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) arcade.buffered_draw_commands.Shape [源代码]#
创建一个矩形轮廓。
函数用于返回可使用绘制的Shape对象
my_shape.draw()
。不要在Draw方法中创建形状,而是在Setup方法中创建它,然后将其绘制到on_draw
。为了获得更快的性能,可以将多个形状添加到ShapeElementList中并绘制该列表。这使得几乎可以像绘制一个形状一样快速地绘制无限形状。
- 参数
返回:形状
arcade.create_rectangles_filled_with_colors#
- arcade.create_rectangles_filled_with_colors(point_list, color_list) arcade.buffered_draw_commands.Shape [源代码]#
此函数使用顶点缓冲区对象创建多个矩形/四边形。
函数用于返回可使用绘制的Shape对象
my_shape.draw()
。不要在Draw方法中创建形状,而是在Setup方法中创建它,然后将其绘制到on_draw
。为了获得更快的性能,可以将多个形状添加到ShapeElementList中并绘制该列表。这使得几乎可以像绘制一个形状一样快速地绘制无限形状。
arcade.create_triangles_filled_with_colors#
- arcade.create_triangles_filled_with_colors(point_list, color_list) arcade.buffered_draw_commands.Shape [源代码]#
此函数使用顶点缓冲区对象创建多个矩形/四边形。
函数用于返回可使用绘制的Shape对象
my_shape.draw()
。不要在Draw方法中创建形状,而是在Setup方法中创建它,然后将其绘制到on_draw
。为了获得更快的性能,可以将多个形状添加到ShapeElementList中并绘制该列表。这使得几乎可以像绘制一个形状一样快速地绘制无限形状。