LabeledArrow#
Qualified name: manim.mobject.geometry.labeled.LabeledArrow
- class LabeledArrow(*args, **kwargs)[source]#
Bases:
LabeledLine
,Arrow
Constructs an arrow containing a label box somewhere along its length. This class inherits its label properties from LabeledLine, so the main parameters controlling it are the same.
- Parameters:
label (str | Tex | MathTex | Text) – Label that will be displayed on the line.
label_position (float | optional) – A ratio in the range [0-1] to indicate the position of the label with respect to the length of the line. Default value is 0.5.
font_size (float | optional) – Control font size for the label. This parameter is only used when label is of type str.
label_color (ParsableManimColor | optional) – The color of the label’s text. This parameter is only used when label is of type str.
label_frame (Bool | optional) – Add a SurroundingRectangle frame to the label box.
frame_fill_color (ParsableManimColor | optional) – Background color to fill the label box. If no value is provided, the background color of the canvas will be used.
frame_fill_opacity (float | optional) – Determine the opacity of the label box by passing a value in the range [0-1], where 0 indicates complete transparency and 1 means full opacity.
See also
Examples
Example: LabeledArrowExample ¶
from manim import * class LabeledArrowExample(Scene): def construct(self): l_arrow = LabeledArrow("0.5", start=LEFT*3, end=RIGHT*3 + UP*2, label_position=0.5) self.add(l_arrow)
class LabeledArrowExample(Scene): def construct(self): l_arrow = LabeledArrow("0.5", start=LEFT*3, end=RIGHT*3 + UP*2, label_position=0.5) self.add(l_arrow)
Methods
Attributes
animate
Used to animate the application of any method of
self
.animation_overrides
color
depth
The depth of the mobject.
fill_color
If there are multiple colors (for gradient) this returns the first one
height
The height of the mobject.
n_points_per_curve
sheen_factor
stroke_color
width
The width of the mobject.
- _original__init__(*args, **kwargs)#
Initialize self. See help(type(self)) for accurate signature.
- Return type:
None