diff --git a/app/src/main/java/com/annimon/hotarufx/visual/objects/SVGPathNode.java b/app/src/main/java/com/annimon/hotarufx/visual/objects/SVGPathNode.java index 1f7cbb3..4eef155 100644 --- a/app/src/main/java/com/annimon/hotarufx/visual/objects/SVGPathNode.java +++ b/app/src/main/java/com/annimon/hotarufx/visual/objects/SVGPathNode.java @@ -5,6 +5,7 @@ import com.annimon.hotarufx.visual.PropertyTimeline; import com.annimon.hotarufx.visual.PropertyTimelineHolder; import com.annimon.hotarufx.visual.TimeLine; import com.annimon.hotarufx.visual.visitors.NodeVisitor; +import javafx.scene.shape.FillRule; import javafx.scene.shape.SVGPath; import static com.annimon.hotarufx.visual.PropertyType.STRING; @@ -13,6 +14,7 @@ public class SVGPathNode extends ShapeNode { public final SVGPath svgPath; private PropertyTimelineHolder content; + private PropertyTimelineHolder fillRule; public SVGPathNode() { this(new SVGPath()); @@ -22,22 +24,29 @@ public class SVGPathNode extends ShapeNode { super(svgPath); this.svgPath = svgPath; content = PropertyTimelineHolder.empty(); + fillRule = PropertyTimelineHolder.empty(); } public PropertyTimeline contentProperty() { return content.setIfEmptyThenGet(svgPath::contentProperty); } + public PropertyTimeline fillRuleProperty() { + return fillRule.setIfEmptyThenGet(enumToString(FillRule.class, svgPath.fillRuleProperty())); + } + @Override public void buildTimeline(TimeLine timeline) { super.buildTimeline(timeline); content.applyIfPresent(timeline); + fillRule.applyIfPresent(timeline); } @Override public PropertyBindings propertyBindings(PropertyBindings bindings) { return super.propertyBindings(bindings) - .add("content", STRING, this::contentProperty); + .add("content", STRING, this::contentProperty) + .add("fillRule", STRING, this::fillRuleProperty); } @Override