drawWithQuality on rectangle shapes and anti-aliasing on the border
I am trying to export images from a DisplayObject.
I do it from a line of code such as:
render_ = new BitmapData(Math.round(finalSize_.x) * scaleX, Math.round(finalSize_.y) * scaleY, true, 0xFFFF00FF)
render_.drawWithQuality(dobj, matrix, null, null, null, true, StageQuality.BEST)
The problem I'm running into is that when I have a symbol which are shapes which occupy a known rectangular area and I render out the bitmap, the lower edges end up with a bit of magenta mixed in.
Ideally I want to generate the image without this. I have found that if I put those shapes into a symbol and then right click on it and "Generate Sprite Sheet..." a few things show up:
Border padding and shape padding. Moreover, when I render it out from here, there are no mixed in colors. It comes out as expected.
Below are my results. I scaled it up to make the magenta easier to see.
It doesn't matter if I change colors.
Also note that I can lower the quality and it will go away. The problem is I need to scale to generate larger sizes of the shapes. This results in them looking poorly.
Clearly Animate itself can generate a clean version. I'm wondering if there is a way via Actionscript to do the same.

