线连接类型¶
限定名称: manim.constants.LineJointType
- class LineJointType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
基础:
Enum可用的线条连接类型集合。
请参见下面的示例,以直观地展示不同类型的关节。
示例
示例:LineJointVariants ¶
from manim import * class LineJointVariants(Scene): def construct(self): mob = VMobject(stroke_width=20, color=GREEN).set_points_as_corners([ np.array([-2, 0, 0]), np.array([0, 0, 0]), np.array([-2, 1, 0]), ]) lines = VGroup(*[mob.copy() for _ in range(len(LineJointType))]) for line, joint_type in zip(lines, LineJointType): line.joint_type = joint_type lines.arrange(RIGHT, buff=1) self.add(lines) for line in lines: label = Text(line.joint_type.name).next_to(line, DOWN) self.add(label)
class LineJointVariants(Scene): def construct(self): mob = VMobject(stroke_width=20, color=GREEN).set_points_as_corners([ np.array([-2, 0, 0]), np.array([0, 0, 0]), np.array([-2, 1, 0]), ]) lines = VGroup(*[mob.copy() for _ in range(len(LineJointType))]) for line, joint_type in zip(lines, LineJointType): line.joint_type = joint_type lines.arrange(RIGHT, buff=1) self.add(lines) for line in lines: label = Text(line.joint_type.name).next_to(line, DOWN) self.add(label)属性
AUTOROUNDBEVELMITER