summaryrefslogtreecommitdiff
path: root/lib/elements/fill_stitch.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/elements/fill_stitch.py')
-rw-r--r--lib/elements/fill_stitch.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/elements/fill_stitch.py b/lib/elements/fill_stitch.py
index 117bb379..203c9fe8 100644
--- a/lib/elements/fill_stitch.py
+++ b/lib/elements/fill_stitch.py
@@ -103,6 +103,15 @@ class StrokeAndFillWarning(ValidationWarning):
]
+class NoGradientWarning(ValidationWarning):
+ name = _("No linear gradient color")
+ description = _("Linear Gradient has no linear gradient color.")
+ steps_to_solve = [
+ _('* Open the Fill and Stroke dialog.'),
+ _('* Set a linear gradient as a fill and adapt colors to your liking.')
+ ]
+
+
class InvalidShapeError(ValidationError):
name = _("This shape is invalid")
description = _('Fill: This shape cannot be stitched out. Please try to repair it with the "Break Apart Fill Objects" extension.')
@@ -659,6 +668,10 @@ class FillStitch(EmbroideryElement):
yield DisjointGuideLineWarning(self.shape.centroid)
return None
+ # linear gradient fill
+ if self.fill_method == 'linear_gradient_fill' and self.gradient is None:
+ yield NoGradientWarning(self.shape.representative_point())
+
if self.node.style('stroke', None) is not None:
if not self.shape.is_empty:
yield StrokeAndFillWarning(self.shape.representative_point())