DrawBorderThenFill

合格名称: manim.animation.creation.DrawBorderThenFill

class DrawBorderThenFill(mobject=None, *args, use_override=True, **kwargs)[source]

基类: Animation

先绘制边框,然后显示填充。

示例

示例: ShowDrawBorderThenFill

from manim import *

class ShowDrawBorderThenFill(Scene):
    def construct(self):
        self.play(DrawBorderThenFill(Square(fill_opacity=1, fill_color=ORANGE)))
class ShowDrawBorderThenFill(Scene):
    def construct(self):
        self.play(DrawBorderThenFill(Square(fill_opacity=1, fill_color=ORANGE)))

方法

开始

开始动画。

获取所有mobject

获取动画中涉及的所有 mobject。

获取轮廓

获取描边颜色

插值子对象

属性

运行时间

参数:
  • vmobject (VMobject | OpenGLVMobject)

  • run_time (float)

  • rate_func (Callable[[float], float])

  • stroke_width (浮点数)

  • stroke_color (str)

  • draw_border_animation_config (dict)

  • fill_animation_config (dict)

  • introducer (bool)

_original__init__(vmobject, run_time=2, rate_func=<function double_smooth>, stroke_width=2, stroke_color=None, draw_border_animation_config={}, fill_animation_config={}, introducer=True, **kwargs)

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

参数:
  • vmobject (VMobject | OpenGLVMobject)

  • run_time (float)

  • rate_func (Callable[[float], float])

  • stroke_width (浮点数)

  • stroke_color (str)

  • draw_border_animation_config (dict)

  • fill_animation_config (dict)

  • introducer (bool)

返回类型:

begin()[source]

开始动画。

此方法在动画播放时立即调用。应尽可能多的初始化,特别是任何 mobject 复制,都应在此方法中进行。

返回类型:

get_all_mobjects()[source]

获取动画中涉及的所有 mobject。

顺序必须与 interpolate_submobject 的参数顺序匹配

返回:

mobject 序列。

返回类型:

Sequence[Mobject]