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
精彩评论