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();
问题在于,当我将文字绘制为图形时,它会失去质量,如何做到这一点而失去了质量?
看到差异?
首先转换为图像,第二个是原始
答案 0 :(得分:0)
确保文本字段的坐标是整数。
ex.x = int(/*your formula*/);
//or
ex.x = Math.round(/*your formula*/);