VMobjectFromSVGPath¶
完整名称: manim.mobject.svg.svg\_mobject.VMobjectFromSVGPath
- 类 VMobjectFromSVGPath(path_obj, long_lines=False, should_subdivide_sharp_curves=False, should_remove_null_curves=False, **kwargs)[源]¶
基类:
VMobject
一个表示 SVG 路径的矢量化 Mobject。
注意
只有在使用 OpenGL 渲染器时,
long_lines
、should_subdivide_sharp_curves
和should_remove_null_curves
关键字参数才会被考虑。- 参数:
path_obj (se.Path) – 一个已解析的 SVG 路径对象。
long_lines (bool) – 矢量化 Mobject 中的直线是否以一段或两段绘制。
should_subdivide_sharp_curves (bool) – 如果两条线段以比给定阈值更锐利的角度相交,是否进一步细分子曲线。
should_remove_null_curves (bool) – 是否移除长度为 0 的子曲线。
kwargs – 其他关键字参数将传递给父类。
方法
初始化
points
,从而确定形状。handle_commands
init_points (初始化点)
属性
animate (动画)
用于动画化
self
的任何方法的应用。animation_overrides (动画覆盖)
颜色
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))。
- 参数:
path_obj (Path)
long_lines (bool)
should_subdivide_sharp_curves (bool)
should_remove_null_curves (bool)
- generate_points()¶
初始化
points
,从而确定形状。在创建时调用。这是一个空方法,可由子类实现。
- 返回类型:
无