开发者

Draw Lines in canvas

I'm trying to draw lines on a canvas object. When the width of the Canvas is less that the width of the line, it draws outside the Canvas over other elements. I read about this problem and I try to resolve using a inner Canvas with a longer height so a scrollbar appears. But I also read that this problem can be correct using a mask but I do not know what i开发者_如何学Gos the better way. Which do you recommend?

<mx:Canvas id="panelContentECG" width="100%" height="400" backgroundAlpha="0.5" styleName="miCanvas" borderStyle="solid" cornerRadius="20" borderColor="0xFCFE00" horizontalScrollPolicy="off">
   <mx:Canvas id="panelDrawECG" width="100%" height="600" >  
   </mx:Canvas>
</mx:Canvas>

Is there another way to get draw in a Canvas? Any suggestions??

Thanks in advance,

Alicia


try using clipContent="true" on your canvas and you can disable the scrollbars if you don't want them showing

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜