2012-10-24 51 views
0
 ex = new TextField(); 
     ex.styleSheet = styleSheet; //some custom fonts 
     ex.htmlText = '<p>EX</p>'; 
     ex.autoSize = 'left'; 
     //ex.embedFonts = true; 
     //var exbitmap:Bitmap; 
     //exbitmap = new Bitmap(new BitmapData(ex.width,ex.height,true,0x000000)); 
     //exbitmap.bitmapData.draw(ex); 
     var bitmapdata:BitmapData = new BitmapData(ex.width, ex.height, true, 0x00000000); 
     bitmapdata.draw(ex); 


     graphics.beginBitmapFill(bitmapdata); 
     graphics.drawRect(0, 0, ex.width, ex.height); 
     graphics.endFill(); 

問題是,當我將文本繪製爲圖形時,它會丟失質量,如何做到這一點,以免失去質量?如何將文本轉換爲圖形而不會丟失質量

enter image description here

enter image description here

看到differenece?

這首被轉換成圖像,第二個是原來

+0

什麼想法?..... –

+3

嘗試改變反鋸齒'ex.antiAliasType = AntiAliasType.ADVANCED' – Engineer

+0

你有什麼樣子的文本和位圖截圖?這可能更容易說明問題所在。 – Herms

回答

0

確保文本字段的座標是整數。

ex.x = int(/*your formula*/); 
//or 
ex.x = Math.round(/*your formula*/); 
相關問題