绘制边框然后填充

限定名称: 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)))

方法

begin

开始动画。

get_all_mobjects

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

get_outline

get_stroke_color

interpolate_submobject

Parameters:
  • vmobject (VMobject | OpenGLVMobject)

  • run_time (float)

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

  • stroke_width (float)

  • stroke_color (str)

  • draw_border_animation_config (dict)

  • fill_animation_config (字典)

  • 介绍人 (布尔型)

begin()[source]

开始动画。

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

Return type:

get_all_mobjects()[source]

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

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

Returns:

mobjects的序列。

Return type:

序列[Mobject]