Hi!
I'm having a question about ImageView, Canvas and DrawPath().
I want to draw multiple lines with DrawPath with this Code (see also attachment for a demo):
Dim canvas1 As Canvas
canvas1.Initialize(ImageView1)
Dim PolygonPath As Path
PolygonPath.Initialize (64,154)
PolygonPath.LineTo (113,234)
PolygonPath.LineTo (193,114)
PolygonPath.LineTo (203,80)
PolygonPath.LineTo (293,54)
PolygonPath.LineTo (423,24)
canvas1.ClipPath(PolygonPath)
canvas1.DrawPath(PolygonPath,Colors.Cyan, False, 12dip)
canvas1.RemoveClip
Problem 1: there is often something like a "gap" in the line. If I remove a few points in the middle, then the gap sometimes disappears ... but this is no solution, because I need the points ;-)
Problem 2: the line on the end (on the right) is conical? Why is it not "normal" (angular)?
After many hours of investigation, I found the reason for it: ClipPath() and RemoveClip().
My first I thought: "Ok, I remove the lines and everything is working fine". And it really worked fine!
Do you know some reason, why I should use these lines?
I found the code above many months ago. Somebody posted it in a thread in this forum for a demo. Since I found this thread, I used it as template. But I never knew, why I have to use the clipper?
Do you think, it is bad, not to use the clipping-functions?
Thank you!!
BR Wolfgang