fred august
fred august

Reputation: 1107

Draw multiple graphical objects in a spark itemRenderer using MXML?

I would like my spark ItemRenderer to be able to render a varying number of graphical objects that depends on the user input. As an example, let's say that I want to render a set of ellipses on a line.

I've been using MXML for my most recent batch of ItemRenderers and have loved every minute of it, but I'm not sure how to accomplish the above goal with an MXML IR. In Actionscript I can acquire the list of ellipses locations and draw them programmatically in the updateDisplayList method. Is there an equivalent in MXML?

thank you for your help!

Upvotes: 0

Views: 393

Answers (1)

Constantiner
Constantiner

Reputation: 14221

Of course you can place a DataGroup inside your item renderer and place there some graphical primitives like Ellipse driven by data provider. But from the performance point of view this implementation will be very problematic. I suggest you to override updateDisplayList() in your MXML item renderer and perform all the drawings there.

Upvotes: 1

Related Questions