kopia lustrzana https://github.com/inkstitch/inkstitch
Add shape property to clone (#2637)
rodzic
5daa3aa3f0
commit
a001667470
|
@ -6,6 +6,7 @@
|
|||
from math import atan2, degrees, radians
|
||||
|
||||
from inkex import CubicSuperPath, Path, Transform
|
||||
from shapely import MultiLineString
|
||||
|
||||
from ..commands import is_command_symbol
|
||||
from ..i18n import _
|
||||
|
@ -142,6 +143,14 @@ class Clone(EmbroideryElement):
|
|||
center = self.node.bounding_box(transform).center
|
||||
return center
|
||||
|
||||
@property
|
||||
def shape(self):
|
||||
path = self.node.get_path()
|
||||
transform = Transform(self.node.composed_transform())
|
||||
path = path.transform(transform)
|
||||
path = path.to_superpath()
|
||||
return MultiLineString(path)
|
||||
|
||||
def validation_warnings(self):
|
||||
source_node = get_clone_source(self.node)
|
||||
if source_node.tag not in EMBROIDERABLE_TAGS:
|
||||
|
|
Ładowanie…
Reference in New Issue