flex / as3-当我旋转绘制了bitmapdata的对象时,细弯曲的线条遇到了uicomponent边缘

时间:2014-03-20 13:22:21

标签: actionscript-3 flash flex

我通过graphics.draw在ui组件上绘制bitmapdata。这些是边界件。但是当我旋转或缩放该组件时,它会在组件边缘创建弯曲的线条。

我试过了 - >平滑,像素保存,位图缓存,阶段性,并且还将我的位图更改为300dpi,但仍然面临运气不佳

  • 使用flex 4.6

enter image description here

1 个答案:

答案 0 :(得分:2)

我做了一个棘手的解决方案。

Need to draw one eraser on border so that border getting transparent.

/**
Create One UI component
Where you can add your bitmap data
Set its blend mode to BlendMode.LAYER
*/
var imgUI:UIComponent = new UIComponent();
this.addChild(imgUI);
imgUI.blendMode = BlendMode.LAYER;

/**
Create One UI component
Where you can write erase border code
Set its blend mode to BlendMode.ERASE
*/
eraser = new UIComponent();
imgUI.addChild(eraser);
eraser.blendMode = BlendMode.ERASE;

/**
Draw Btiamdata
*/
imgUI.graphics.clear();
imgUI.graphics.beginBitmapFill(urBitmapData,new Matrics,true,true);
imgUI.graphics.drawRect(0,0,urBitmapData.width,urBitmapData.height);
imgUI.graphics.endFill();

/**
Write eraser code
*/  
eraser.graphics.clear();
eraser.graphics.beginFill(0xffffff, 1);
eraser.graphics.drawRect(0, 0, 2, urBitmapData.height);
eraser.graphics.endFill();

请告诉我是否有任何疑惑