The Drawing class is a canvas that allows you to create drawings containing lines or polygon shapes.
You can use polygons to draw a triangle, rectangle, diamond, hexagon or any random shape.
To use this component, install the Zebble.Drawing nuget package.
It's open source and available on GitHub. Also we welcome any contributions to enhace it.
Sample:
<Drawing.Line Start="100, 100" End="200, 200" Color="#000000" />
<Drawing.Line ... /><Drawing.Polygon Id="MySquare" LineColor="#ff0000" LineThickness="3" FillColor="#ffffff">
<Point X="0" Y="0" />
<Point X="100" Y="0" />
<Point X="100" Y="100" />
<Point X="0" Y="100" />
</Drawing.Polygon>
</Drawing>
If not specified, by default:
Of course you can create a drawing with code, like any other Zebble object. For example:
myDrawing.Add(new Line(new Point(0, 0), new Point(100, 0)));
....