I want to make a "pixelated" border of a button with rounded corners. Easy, right? Unfortunately not.
My current version of EmWi is 10.00
Setting a path, add lines and arcs in the init method.
Path.SetMaxNoOfSubPaths( 1 );
Path.InitSubPath( 0, 8 + 4*3 );
Path.GetNoOfEdges( 0 );
Path.Begin( 0, 7, 0 );
Path.AddLine( 0, 32, 0 );
Path.AddArc( 0, 32, 7, 7, 7, -90.0, 0.0, 3 );
Path.AddLine( 0, 39, 32 );
Path.AddArc( 0, 32, 32, 7, 7, 0.0, 90.0, 3 );
Path.AddLine( 0, 7, 39 );
Path.AddArc( 0, 7, 32, 7, 7, 90.0, 180.0, 3 );
Path.AddLine( 0, 0, 7 );
Path.AddArc( 0, 7, 7, 7, 7, 180.0, 270.0, 3 );
Path.Close( 0 );
Add a StrokePath, set the created path and set Quality to false (=pixelated). Width of the StrokePath set to 1 (=Default, and intended).
Increasing the number of edges will lead to the arcs getting "missing pixels", which is not acceptable as well.
Now even if I ditch the rounded corners and just add lines, it will render vertical lines invisible.
Path.SetMaxNoOfSubPaths( 1 );
Path.InitSubPath( 0, 8 );
Path.GetNoOfEdges( 0 );
Path.Begin( 0, 0, 0 );
Path.AddLine( 0, 39, 0 );
Path.AddLine( 0, 39, 39 );
Path.AddLine( 0, 0, 39 );
Path.AddLine( 0, 0, 0 );
Path.Close( 0 );
The vertical lines are not visible on the prototyper neither on the device screen.
What am I doing wrong?