diff --git a/masque/shapes/path.py b/masque/shapes/path.py index 654cfaa..ad6da5d 100644 --- a/masque/shapes/path.py +++ b/masque/shapes/path.py @@ -24,7 +24,16 @@ class PathCap(Enum): # # defined by path.cap_extensions def __lt__(self, other: Any) -> bool: - return self.value == other.value + if self.__class__ is not other.__class__: + return self.__class__.__name__ < other.__class__.__name__ + # Order: Flush, Square, Round, SquareCustom, Circle + order = { + PathCap.Flush: 0, + PathCap.Square: 1, + PathCap.Circle: 2, + PathCap.SquareCustom: 3, + } + return order[self] < order[other] @functools.total_ordering