manim.mobject.svg.svg_mobject.VMobjectFromSVGPathstring

class VMobjectFromSVGPathstring(path_string, **kwargs)[source]

Bases: manim.mobject.types.vectorized_mobject.VMobject

Methods

generate_points

Generates points from a given an SVG d attribute.

get_original_path_string

A simple getter for the path’s d attribute.

get_path_commands

Returns a list of possible path commands used within an SVG d attribute.

handle_command

Core logic for handling each of the various path commands.

string_to_points

Since the SVG file’s path command is provided as a string, this converts the coordinates into numbers.

Attributes

animate

Used to animate the application of a method.

generate_points()[source]

Generates points from a given an SVG d attribute.

get_original_path_string()[source]

A simple getter for the path’s d attribute.

get_path_commands()[source]

Returns a list of possible path commands used within an SVG d attribute.

See: https://svgwg.org/svg2-draft/paths.html#DProperty for further details on what each path command does.

Returns

The various upper and lower cased path commands.

Return type

List[str]

handle_command(command, coord_string)[source]

Core logic for handling each of the various path commands.

string_to_points(coord_string)[source]

Since the SVG file’s path command is provided as a string, this converts the coordinates into numbers.