I have a very odd problem with the canvas_arc function.
I want to draw some circles together with two lines for the axes. While both are shown in the Lemur editor, the circles do not show up on the iPad air device (see attachment). I also tried to change the order of the function call (first draw axes, then the circles), but the circles never show up. What makes it even more strange is the fact that it worked 5 months ago.
Here comes the code.
Code: Select all
decl c = getobject();
decl rect = getobjectrect(c);
decl w = rect[2];
decl h = rect[3];
decl numberCircles = 5;
decl i;
decl radius = w/(2*numberCircles);
canvas_clear(c);
canvas_setStrokeStyle(c,{0.6, 0.6,0.6,0.6});
canvas_setLineWidth(c,2);
for(i = 0;i < numberCircles;i++)
{
canvas_beginPath(c);
canvas_arc(c,0.5*w,0.5*h,(radius * i + radius)-2,0,2*pi,2);
canvas_closePath(c);
canvas_stroke(c);
}
canvas_beginPath(c);
canvas_rect(c,0,0.5*h,w,1);
canvas_rect(c,0.5*w,0,1,h);
canvas_closePath(c);
canvas_stroke(c);
Thanks and best,
Dirk