Date: 2009-09-10 16:51:52 -0700 (Thu, 10 Sep 2009)
Adding alpha to BitmapFill
http://bugs.adobe.com/jira/browse/SDK-22932 - Border's backgroundAlpha style has no effect when backgroundImage is set
I have added an alpha property to BitmapFill. Since graphics.beginBitmapFill doesn?\226?\128?\153t have an alpha parameter, I have to clone the bitmapData source and apply to it a colorTransform (which contains the alphaMultipler).
If the source image doesn't support an alpha channel (ex. JPEG), then I need to copy the source into a new bitmapData object that supports transparency. This occurs one time in the source setter.
If the alpha or source has changed, then I need to copy the source into a new bitmapData. The reason is that using the BitmapData.colorTransform function is cumulative. Once I've applied an alphaMultiplier to it, there is no way to restore the alpha. I've optimized the code a bit to only copy the bitmapData if needed. For example, if we have already copied the data to add the transparent pixel border (to prevent the streaking effect on a non-repeating fill), then we forgo the copying.
QE notes: Need new tests for this property
Doc notes: Need docs for this property
Tests run: checkintests
Is noteworthy for integration: Yes