Line in Canvas

107 views
Skip to first unread message

GlowScarf

unread,
Aug 7, 2018, 3:26:59 AM8/7/18
to MIT App Inventor Forum

When i increase line width in order to draw bigger lines, that bigger lines are not perfect. What i mean is that they have missing parts! How to fix that?
38744650_248095642696349_6659506114259845120_n.png

SteveJG

unread,
Aug 7, 2018, 9:23:25 AM8/7/18
to mitappinv...@googlegroups.com
You did not post your Block image so I do not really know how you are drawing.   Probably instead of  Canvas1.DrawLine   in your Canvas1.Dragged event handler, use Canvas1.DrawCircle   which will draw a smoother, wide line.


1)  line /   is a continuous line with width of 2 using DrawLine
2)  line /  is a  continuous line with width of 10 using DrawLine ... what you show
3) circle 0 is a  continuous  line drawn with width of 2 using DrawCircle
4) circle 0 is a  continuous  line drawn with width of 10 using DrawCircle

Did it work for you?

Regards,
Steve

Abraham Getzler

unread,
Aug 7, 2018, 9:29:00 AM8/7/18
to MIT App Inventor Forum
From your sample, it looks like you are zig zagging your lines, and the gaps
appear when your path curves, like the side view of a bent spring.

You might have to rotate your lines by 90 degrees and widen them to cover those gaps.

Post your blocks?

ABG
Reply all
Reply to author
Forward
0 new messages