LabeledDot¶
全称: manim.mobject.geometry.arc.LabeledDot
- class LabeledDot(label, radius=None, **kwargs)[source]¶
基类:
Dot一个中心包含标签的
Dot。- 参数:
示例
示例: SeveralLabeledDots ¶
from manim import * class SeveralLabeledDots(Scene): def construct(self): sq = Square(fill_color=RED, fill_opacity=1) self.add(sq) dot1 = LabeledDot(Tex("42", color=RED)) dot2 = LabeledDot(MathTex("a", color=GREEN)) dot3 = LabeledDot(Text("ii", color=BLUE)) dot4 = LabeledDot("3") dot1.next_to(sq, UL) dot2.next_to(sq, UR) dot3.next_to(sq, DL) dot4.next_to(sq, DR) self.add(dot1, dot2, dot3, dot4)
class SeveralLabeledDots(Scene): def construct(self): sq = Square(fill_color=RED, fill_opacity=1) self.add(sq) dot1 = LabeledDot(Tex("42", color=RED)) dot2 = LabeledDot(MathTex("a", color=GREEN)) dot3 = LabeledDot(Text("ii", color=BLUE)) dot4 = LabeledDot("3") dot1.next_to(sq, UL) dot2.next_to(sq, UR) dot3.next_to(sq, DL) dot4.next_to(sq, DR) self.add(dot1, dot2, dot3, dot4)方法
属性
animate (动画)用于动画化
self的任何方法的应用。animation_overrides (动画覆盖)颜色depth (深度)mobject 的深度。
fill_color (填充颜色)如果存在多种颜色(用于渐变),则返回第一种颜色
height (高度)mobject 的高度。
n_points_per_curve (每条曲线的点数)sheen_factor (光泽因子)stroke_color (描边颜色)width (宽度)mobject 的宽度。
- _original__init__(label, radius=None, **kwargs)¶
初始化自身。有关准确签名,请参阅 help(type(self))。
- 参数:
label (str | SingleStringMathTex | Text | Tex)
radius (float | None)
kwargs (Any)
- 返回类型:
无