svg_path_editor.path_change_origin ================================== .. py:module:: svg_path_editor.path_change_origin Functions --------- .. autoapisummary:: svg_path_editor.path_change_origin.change_path_origin Module Contents --------------- .. py:function:: change_path_origin(svg, new_origin_index, subpath = None) Return a new path where the origin of a (sub)path is moved. The command at ``new_origin_index`` becomes the first command of the affected subpath segment; all items of that subpath are rotated accordingly. If ``subpath`` is ``True``, only the subpath containing ``new_origin_index`` is transformed; if ``False``/``None``, the whole path is treated as a single segment. :param svg: Original path to transform. :param new_origin_index: Index of the command that should become the new origin within its subpath. :param subpath: If ``True``, restrict the change to the subpath containing ``new_origin_index``; if ``False`` or ``None``, treat the full path segment as one subpath. :return: A new :class:`~svg_path_editor.SvgPath` instance with the origin moved and the path representation optimized.