DashedLine#
Qualified name: manim.mobject.geometry.line.DashedLine
- class DashedLine(*args, dash_length=0.05, dashed_ratio=0.5, **kwargs)[source]#
Bases:
Line
A dashed
Line
.- Parameters
See also
Examples
Example: DashedLineExample ¶
from manim import * class DashedLineExample(Scene): def construct(self): # dash_length increased dashed_1 = DashedLine(config.left_side, config.right_side, dash_length=2.0).shift(UP*2) # normal dashed_2 = DashedLine(config.left_side, config.right_side) # dashed_ratio decreased dashed_3 = DashedLine(config.left_side, config.right_side, dashed_ratio=0.1).shift(DOWN*2) self.add(dashed_1, dashed_2, dashed_3)
Methods
Returns the end point of the line.
Returns the point of the first handle.
Returns the point of the last handle.
Returns the start point of the line.
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.
- get_end()[source]#
Returns the end point of the line.
Examples
>>> DashedLine().get_end() array([1., 0., 0.])
- Return type
ndarray
- get_first_handle()[source]#
Returns the point of the first handle.
Examples
>>> DashedLine().get_first_handle() array([-0.98333333, 0. , 0. ])
- Return type
ndarray