prettify svg2paths docstring (Google style)
parent
900d5ba93b
commit
aa02116e87
|
@ -84,23 +84,29 @@ def svg2paths(svg_file_location,
|
||||||
convert_polygons_to_paths=True,
|
convert_polygons_to_paths=True,
|
||||||
return_svg_attributes=False,
|
return_svg_attributes=False,
|
||||||
convert_ellipses_to_paths=True):
|
convert_ellipses_to_paths=True):
|
||||||
"""
|
"""Converts an SVG into a list of Path objects and attribute dictionaries.
|
||||||
|
|
||||||
Converts an SVG file into a list of Path objects and a list of
|
Converts an SVG file into a list of Path objects and a list of
|
||||||
dictionaries containing their attributes. This currently supports
|
dictionaries containing their attributes. This currently supports
|
||||||
SVG Path, Line, Polyline, Polygon, Circle, and Ellipse elements.
|
SVG Path, Line, Polyline, Polygon, Circle, and Ellipse elements.
|
||||||
:param svg_file_location: the location of the svg file
|
|
||||||
:param convert_lines_to_paths: Set to False to disclude SVG-Line objects
|
Args:
|
||||||
(converted to Paths)
|
svg_file_location (string): the location of the svg file
|
||||||
:param convert_polylines_to_paths: Set to False to disclude SVG-Polyline
|
convert_lines_to_paths (bool): Set to False to disclude SVG-Line objects
|
||||||
objects (converted to Paths)
|
(converted to Paths)
|
||||||
:param convert_polygons_to_paths: Set to False to disclude SVG-Polygon
|
convert_polylines_to_paths (bool): Set to False to disclude SVG-Polyline
|
||||||
objects (converted to Paths)
|
objects (converted to Paths)
|
||||||
:param return_svg_attributes: Set to True and a dictionary of
|
convert_polygons_to_paths (bool): Set to False to disclude SVG-Polygon
|
||||||
svg-attributes will be extracted and returned
|
objects (converted to Paths)
|
||||||
:param convert_ellipses_to_paths: Set to False to disclude SVG-Ellipse
|
return_svg_attributes (bool): Set to True and a dictionary of
|
||||||
objects (converted to Paths). Circles are treated as ellipses.
|
svg-attributes will be extracted and returned
|
||||||
:return: list of Path objects, list of path attribute dictionaries, and
|
convert_ellipses_to_paths (bool): Set to False to disclude SVG-Ellipse
|
||||||
(optionally) a dictionary of svg-attributes
|
objects (converted to Paths). Circles are treated as ellipses.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
list: The list of Path objects.
|
||||||
|
list: The list of corresponding path attribute dictionaries.
|
||||||
|
dict (optional): A dictionary ofsvg-attributes.
|
||||||
"""
|
"""
|
||||||
if os_path.dirname(svg_file_location) == '':
|
if os_path.dirname(svg_file_location) == '':
|
||||||
svg_file_location = os_path.join(getcwd(), svg_file_location)
|
svg_file_location = os_path.join(getcwd(), svg_file_location)
|
||||||
|
|
Loading…
Reference in New Issue