ShapeMatchers

SurroundingRectangle

class manimlib.mobject.shape_matchers.SurroundingRectangle(mobject: Mobject, **kwargs)

包围矩形框

  • buff : 矩形框与被包含物件的间隙

BackgroundRectangle

class manimlib.mobject.shape_matchers.BackgroundRectangle(mobject: Mobject, color: ManimColor = None, **kwargs)

背景矩形框

  • buff : 矩形框与被包含物件的间隙

get_fill_color() → colour.Color

获取填充色

如果是渐变染色,则只会返回颜色列表的第一个

pointwise_become_partial(mobject: Mobject, a: float, b: float)

返回 vmobject 上百分比从 a 到 b 的部分曲线的拷贝

Cross

class manimlib.mobject.shape_matchers.Cross(mobject: Mobject, **kwargs)

叉叉

  • stroke_width : 叉叉线宽,默认两端细中间粗

Underline

class manimlib.mobject.shape_matchers.Underline(mobject: Mobject, **kwargs)

下划线

传入 start, end 为线段起点终点

  • buff : 为两端距离 start,end 的距离(默认为0)

  • path_arc : 如果有此关键字参数,则使用 ArcBetweemPointspath_arc 表示角度