nanogui: Bug in GrArcAngle()
Subject:
Bug in GrArcAngle()
From:
tj ####@####.####
Date:
17 Nov 2004 23:40:41 +0000
Message-Id: <419BE116.2000501@comcast.net>
I have run into a strange problem. I have a semi-circle that I draw an
arc in to show position. The size and position of the arc are based on a
list length and the visible section of the list. It works great accept
for one very annoying problem. When the arc size is less then 6 degrees
and the postion is just below 0 degrees, the arc completely fills the
circle and not the specified arc boundies. Here is the code lines:
<Code here caculates angle and angle width>
if(width < 5)
width = 5; // so we have a decent minimum width.
printf("i = %d, x = %d\n", i, x);
GrArcAngle(wid, gc, 0, 95, 83, 83,i*64, x*64, GR_PIE);
output:
i = 5, x = 10 // ok
i = 1, x = 6 // ok
i = -3, x = 2 //ok
i = -7, x = -2 // Screwed up, semi circle completely filled
i = -11, x = -6 //back to ok
Setting minimum width >=6 causes the problem to disappear, and width<=5
cause it.
Any ideas on the problem.
tj