从SVG路径创建VMobject

限定名称: manim.mobject.svg.svg\_mobject.VMobjectFromSVGPath

class VMobjectFromSVGPath(path_obj, long_lines=False, should_subdivide_sharp_curves=False, should_remove_null_curves=False, **kwargs)[来源]

基础类: VMobject

表示SVG路径的向量化对象。

注意

long_linesshould_subdivide_sharp_curvesshould_remove_null_curves 关键字参数仅在 OpenGL 渲染器中有效。

Parameters:
  • path_obj (se.Path) – 一个解析后的SVG路径对象。

  • long_lines (bool) – 向量化对象中的直线是否以一个或两个线段绘制。

  • should_subdivide_sharp_curves (bool) – 是否在两条线段以比给定阈值更尖锐的角度相交时进一步细分子曲线。

  • should_remove_null_curves (bool) – 是否移除长度为0的子曲线。

  • kwargs – 其他关键字参数传递给父类。

方法

generate_points

初始化 points 并因此确定形状。

handle_commands

init_points

属性

animate

用于动画化self的任何方法的应用。

animation_overrides

color

depth

mobject的深度。

fill_color

如果有多种颜色(用于渐变),则返回第一个颜色

height

mobject的高度。

n_points_per_curve

sheen_factor

stroke_color

width

mobject的宽度。

_original__init__(path_obj, long_lines=False, should_subdivide_sharp_curves=False, should_remove_null_curves=False, **kwargs)

初始化自身。有关准确的签名,请参阅 help(type(self))。

Parameters:
  • path_obj (Path)

  • long_lines (bool)

  • should_subdivide_sharp_curves (bool)

  • should_remove_null_curves (bool)

generate_points()

初始化 points 并因此确定形状。

在创建时调用。这是一个可以由子类实现的空方法。

Return type: