1.21 gigawatts
1.21 gigawatts

Reputation: 17796

Creating a border container with border sides and separate corner radius

In the Spark BorderContainer component the border sides and corner radius styles were not copied over from the halo component set (see here).

Specifically:

I've been trying to add them manually but I'm having some difficulty.

I've brought over some code from the HaloBorder.as skin and it is sortof working except it is appearing behind the background fill.

It's a lot of code so I pasted it here.

BTW That code was my first approach. But it looks like I could use the insetPath that is already there to draw border. That would be better since it allows me to set all the stroke properties but I don't know how to write path data so I'd have to learn that as well. But at this point I'd be happy to get anything working.

Update:
I found a class that has some methods for generating curved border path data. Look in spark/skins/spark/TabBarButtonSkin.mxml. You can see the code here, in the createPathData() method.

Upvotes: 5

Views: 253

Answers (0)

Related Questions