I am trying to print an image with a filter on it. The filter inverts the colors of the image. I add the imgBox to the printJob. But, the image doesn't print with the filter applied. Here is the code:
<mx:Script> <![CDATA[ private function invert():void { var matrix:Array = new Array(); matrix = matrix.concat([-1, 0, 0, 0, 255]); matrix = matrix.concat([ 0, -1, 0, 0, 255]); matrix = matrix.concat([ 0, 0, -1, 0, 255]); matrix = matrix.concat([ 0, 0, 0, 1, 0]); imgBox.filters = [new ColorMatrixFilter(matrix)]; } ]]> </mx:Script> <mx:VBox id="imgBox" width="100%" height="100%" borderColor="red" borderStyle="solid" borderThickness="2"> <common:SmoothImage id="sourceImg" complete="previewPage()" horizontalAlign="center"/> </mx:VBox>