>Hi Dragan,
>
>>>
>
>if between(90, angle1, angle2)
> top=radius + centerY
>else
> top=max(point1y, point2y)
>endif
>
>Now for other four sides, just rotate the whole logic by a right angle. There may be a little consideration over the right side - whether we have negative angles or we have angles of more then 360. IOW, what's the format of the given data.
>>>
>
>In this case the angle increases counterclockwise but the arc is drawn in a clockwise direction. So 'between(90,angle1,angle2)' won't work in many cases - e.g an arc with a start angle of 20 and an end angle of 40 would pass through the 90 degree axis but the expression would return .F.
>
>See my post to Gregory for my current attempt - which I don't particularly like...
That one's as good as it can be - short of repeating my code four times and handling a special case for the right edge. As for the direction of drawing the arc, I'd rather switch the places for the angles, and have them drawn in the standard mathematical direction (i.e. counterclockwise, aka positive direction), simply because that's the way of trigonometry.