GeomVectorGridPortrayal doesn't draw its elements: GeomPortrayal does. So you'd be subclassing that. I'm not in a position to test this, but I imagine you could do it this way:
public class MyGeomPortrayal extends GeomPortrayal
public Paint determineColor(Object object)
// you write this
public void draw(Object object,
paint = determineColor(object);
Then just register a MyGeomPortrayal for the object rather than a GeomPortrayal.
> On Dec 12, 2018, at 9:58 AM, Annetta Burger <[log in to unmask]> wrote:
> Is there a way to subclass a GeomVectorGrid Portrayal to change agent color in response to a dynamic attribute, such as health? There is sample code to do this for Basic Portrayals.
> If not, can some kind of wrapper be used to display this effect in the GUI?
> Thanks for the help.