Skip to main content
Lorenzo_Nuvoletta-K15qTH
Known Participant
June 26, 2012
Question

drawWithQuality() will not draw properly and Stage quality issues on Air 3.3

  • June 26, 2012
  • 5 replies
  • 2001 views

So today i tried to switch from draw to drawWithQuality and I noticed that it doesn't work if the image contains filters.

What happens is that the part drawn is only the part included between the getBounds of a Sprite, eve if you want to draw that image ona larger bitmapData, you will see cuts in the filters.

This doesn't happen if switching the stage quality from LOW to HIGH and using the normal draw() method.

Although doing this brings up a major flaws in Air 3.3, switching the stage quality from LOW to HIGH every time you have to draw drops the perfomance drstically.

Of course in Air 3.2 all works fine.

Opened a bug report for that https://bugbase.adobe.com/index.cfm?event=bug&id=3223291

Is Adobe going to fix drawWithQuality to draw also the filters?

This is the code to reproduce the issue:

var mc:Sprite = new Sprite();

mc.graphics.beginFill(0xCC0000);

mc.graphics.drawCircle(0, 0, 100);

mc.graphics.endFill();

mc.filters = [ new DropShadowFilter(10, 45, 0, 1, 10, 10, 5) ];

var bmp:Bitmap = new Bitmap( new BitmapData(500, 500, true, 0) );

addChild(bmp);

var mat:Matrix = new Matrix();

mat.translate(100, 100);

bmp.bitmapData.drawWithQuality(mc, mat, null, null, null, true, StageQuality.BEST);

This topic has been closed for replies.

5 replies

chris.campbell
Legend
June 26, 2012

Thank you for the bug report.  I saw in one of your comments that you noted this happens on iOS and Android.  Do you also see this on the desktop?

Lorenzo_Nuvoletta-K15qTH
Known Participant
June 26, 2012

No, this only happens on iOS and Android. But this is pretty critical for Mobile development since in Air 3.3 switching the StageQuality from LOW to HIGH and back is broken, the only way to draw is using this method.

Participant
July 3, 2012

i'm also encountering this issue when trying to convert textfield to bitmap. i really need this for my ios app. is there any workaround? im trying to add my textfield and a transparent movieclip into a movieclip container to try to extend the bounds but i cant get it to work.