Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Vector Art to Bitmap - Quality Settings

Explorer ,
Apr 09, 2013 Apr 09, 2013

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?

TOPICS
ActionScript
812
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Apr 27, 2013 Apr 27, 2013

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);

Translate
Community Expert ,
Apr 09, 2013 Apr 09, 2013

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 27, 2013 Apr 27, 2013

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);

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 02, 2013 May 02, 2013
LATEST

also use bitmap.smoothing =  true.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines