[Path] cap_extensions=None should mean [0, 0] when using custom extensions
This commit is contained in:
parent
2019fc0d74
commit
9a76ce5b66
1 changed files with 8 additions and 5 deletions
|
|
@ -88,10 +88,10 @@ class Path(Shape):
|
|||
def cap(self, val: PathCap) -> None:
|
||||
self._cap = PathCap(val)
|
||||
if self.cap != PathCap.SquareCustom:
|
||||
self.cap_extensions = None
|
||||
elif self.cap_extensions is None:
|
||||
self._cap_extensions = None
|
||||
elif self._cap_extensions is None:
|
||||
# just got set to SquareCustom
|
||||
self.cap_extensions = numpy.zeros(2)
|
||||
self._cap_extensions = numpy.zeros(2)
|
||||
|
||||
# cap_extensions property
|
||||
@property
|
||||
|
|
@ -218,9 +218,12 @@ class Path(Shape):
|
|||
self.vertices = vertices
|
||||
self.repetition = repetition
|
||||
self.annotations = annotations
|
||||
self.width = width
|
||||
self.cap = cap
|
||||
self._cap = cap
|
||||
if cap == PathCap.SquareCustom and cap_extensions is None:
|
||||
self._cap_extensions = numpy.zeros(2)
|
||||
else:
|
||||
self.cap_extensions = cap_extensions
|
||||
self.width = width
|
||||
if rotation:
|
||||
self.rotate(rotation)
|
||||
if numpy.any(offset):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue