| Steps to Reproduce: |
While MXML-G can make use of databinding to an Array variable listing 20 numeric values to populate a ColorMatrixFilter, the FXG specification states that a simple comma delimited attribute should be provided. Since FXG does not use databinding, the ActionScript implementation of the matrix property in mx.filters.ColorMatrixFilter needs to accept such a String instead of just an Array.
test.mxml
-------------
<?xml version="1.0" encoding="utf-8"?>
<FxApplication xmlns=" http://ns.adobe.com/mxml/2009" >
<d:ColorMatrixFilterComp x="300" xmlns:d="*" />
</FxApplication>
ColorMatrixFilterComp.fxg
-----------------------------------
<?xml version="1.0" encoding="utf-8"?>
<Graphic xmlns=" http://ns.adobe.com/fxg/2008">
<Group>
<filters>
<ColorMatrixFilter matrix="0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0" />
</filters>
<Rect id="rect1" width="200" height="200" >
<fill>
<SolidColor color="0x330099" />
</fill>
</Rect>
</Group>
</Graphic>
Workaround:
Change this:
<ColorMatrixFilter matrix="0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0" />
To this:
<ColorMatrixFilter matrix="[0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0]" />
While MXML-G can make use of databinding to an Array variable listing 20 numeric values to populate a ColorMatrixFilter, the FXG specification states that a simple comma delimited attribute should be provided. Since FXG does not use databinding, the ActionScript implementation of the matrix property in mx.filters.ColorMatrixFilter needs to accept such a String instead of just an Array.
test.mxml
-------------
<?xml version="1.0" encoding="utf-8"?>
<FxApplication xmlns=" http://ns.adobe.com/mxml/2009" >
<d:ColorMatrixFilterComp x="300" xmlns:d="*" />
</FxApplication>
ColorMatrixFilterComp.fxg
-----------------------------------
<?xml version="1.0" encoding="utf-8"?>
<Graphic xmlns=" http://ns.adobe.com/fxg/2008">
<Group>
<filters>
<ColorMatrixFilter matrix="0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0" />
</filters>
<Rect id="rect1" width="200" height="200" >
<fill>
<SolidColor color="0x330099" />
</fill>
</Rect>
</Group>
</Graphic>
Workaround:
Change this:
<ColorMatrixFilter matrix="0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0" />
To this:
<ColorMatrixFilter matrix="[0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0]" />
|