Fill Paint and Stroke Style

This may have been discussed before, but I would like to be able to access the Fill Paint pattern, foreground and background color properties dynamically on basic shapes (rectangle). Also would be nice to access Stroke Style line weight.

I’d like to display a conveyor as a striped rectangle and change the foreground color (pattern lines) based on whether the drive motor is running or not, the background based on the control state (auto/manual/tripped/estop) and increase the stroke line weight if the conveyor detail pop-up is displayed.

Hi There,
I know it’s a long time ago that you posted this on the forum but I am looking to do it now and so came across your post.
Did you get a solution to this? I am also looking for animating the pattern of a component dynamically along with the background color. I want to add crosshatch for some conditions of a component and other conditions will only animate the background color.

You can set the fill paint property through scripting, though when i tried to set the property to a cross hatch (com.inductiveautomation.ignition.client.util.gui.paints.PatternPaint@a8ce867) it threw an error cannot coerce to java.awt.Paint, but i imagine it can be done, my crude attempt is obviously wrong.
Just as a test i created one rectangle with a cross hatch, one without, and a button that set the fill paint of the second rectange to fill paint of the first which did work.

There is most likely a better way, maybe someone here knows how to script a valid java.awt.Paint?