繁体   English   中英

flex / as3-当我旋转在其上绘制了位图数据的对象时,弯曲的细线碰到了uicomponent边缘

[英]flex/as3-when i rotate object on which bitmapdata is drawn thin crooked line comes across uicomponent edge

我正在通过graphics.draw在ui组件上绘制bitmapdata。 这些是边界件。 但是,当我旋转或缩放该零部件时,它将在零部件的边缘上产生弯曲的线。

我试过->平滑,像素捕捉,位图缓存,stagequality,也将位图更改为300dpi,但仍然遇到运气不好

  • 使用flex 4.6

在此处输入图片说明

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

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

请告诉我是否有任何混淆

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM