Flex SDK Bug Fix - Added scaleGrid support to BitmapGraphic
SDK-17289 - BitmapGraphic source embed does not respect scale9 grid when scaling
BitmapGraphic will use the scaleGrid properties defined on its embedded source. Since the Player doesn't support scaleGrid on bitmaps, we have to slice the bitmap into nine sections and then scale/translate each section. We create two arrays of points along the grid. These are used to define the topLeft and bottomRight corners of the section. Based on the internal scaleFactor and which section we are in, we draw a scaled and translated section according to the scaleGrid rules.
- Changed BitmapGraphic to no longer use the BitmapFill to draw. Instead, BitmapGraphic performs the drawing code itself.
- When the source is set, check if it has scaleGrid properties and store these in internal variable
- Cache the creation of the 16 grid points array. Flush the cache if the source or dimensions have changed
- To see this behavior in action, set width/height to different values than the source's natural dimensions and set resizeMode = "scale"
QE Notes: Add tests for BitmapGraphic with embedded assets using scaleGrid
Doc Notes: Add docs for this functionality