0

I have a short, and maybe simple question for some of you, but:

How do I draw a polyline in android (like the way you normally do with system.windows.shapes)

I have searched around, but can only find how to make a single line. and not a line drawn by a collection of points.

thanks,

Bart

Bart Teunissen
  • 1,420
  • 5
  • 20
  • 43

1 Answers1

1

If i'm not mistake there is no function like Polyline, but you can do your own.

Just draw lines from point to point in cycle.

EDIT

Read this link CrossGraphics, there you will find how to draw lines.

Likurg
  • 2,742
  • 17
  • 22
  • You mean like using a circular or Fifo buffer? and then draw all kinds of single lines? – Bart Teunissen Apr 19 '12 at 12:57
  • Yep, and add first element to end of that buffer for easy implementation (you can draw line from last point to first, but way adding first point at the end is prefered). – Likurg Apr 19 '12 at 13:06
  • I will try do something like this tomorrow :) – Bart Teunissen Apr 19 '12 at 14:06
  • I have looked into it, but i just don't get it started. For example, i cant even find the draw function in c# for android. And what is it with the protected overide void on draw? can you show me some examples to get me started? – Bart Teunissen Apr 20 '12 at 06:44
  • You should download zip file with all css. – Likurg Apr 20 '12 at 07:05
  • And don't forget to read https://github.com/praeclarum/CrossGraphics/blob/master/README.md – Likurg Apr 20 '12 at 07:37