Copy link to clipboard
Copied
I have some vector art in a sprite that I make into a bitmap like so:
var mySprite:Sprite = new myVectorSprite();
var mySpriteBMD = new BitmapData(800,600,true,0x00ffffff);
mySpriteBMD.draw(mySprite);
I just noticed that if the SWF quality settings are set to low when that occurs, the bitmap will look like crap as well. And since it is already drawn, if the user sets the quality back to high, everything else will be in high quality except for that bitmap. Is there a way to force it to draw the bitmap in high quality and then set the quality back to whatever the user had it set to?
Bitmapdata.drawWithQuality is what I was looking for. So my code ends up as this:
var mySprite:Sprite = new myVectorSprite();
var mySpriteBMD = new BitmapData(800,600,true,0x00ffffff);
mySpriteBMD.drawWithQuality(mySprite,null,null,null,null,false,StageQuality.HIGH);
Copy link to clipboard
Copied
no, you can't override the user's settings. but you may be able to listen to a settings change and then redraw your sprite.
Copy link to clipboard
Copied
Bitmapdata.drawWithQuality is what I was looking for. So my code ends up as this:
var mySprite:Sprite = new myVectorSprite();
var mySpriteBMD = new BitmapData(800,600,true,0x00ffffff);
mySpriteBMD.drawWithQuality(mySprite,null,null,null,null,false,StageQuality.HIGH);
Copy link to clipboard
Copied
also use bitmap.smoothing = true.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now