circle method, forming arcs, small problem
This is modified from an example I found in one of my books:
For t = 1 To 10
arc1 = arc2
arc2 = arc1 + (2 * 3.14159) * (0.1)
tColor = 20 * t
Picture1.FillColor = RGB(Int(tColor) / 2, tColor, 255 - tColor)
Picture1.Circle (Picture1.ScaleWidth / 2, Picture1.ScaleHeight / 2), (Picture1.ScaleHeight / 2.1), , -arc1, -arc2
Next t
If you follow that, it makes 10 arcs,each one 1/10 of a full circle
and each one starting where the last one stopped.
(Don't worry about the color, just for a clear picture of what's happening)
I used this to make a pie chart where 10 is the number of groups form my database. Then 0.1 is actually the ratio of group value to total value. (not relevant to the problem)
The problem, which is really just an annoyance, is that the first arc, beginning at zero, is not closed, and therefore does not hold color. It will remain the color of the background (picture or the form where it is drawn). I've tried to overlap it, but vb won't allow continuing past 2pi, I've tried putting a new arc of the same value at positions 0 and value 1 * 2pi (basically drawing the arc again on top of itself), but the arc that begins at zero has no line connecting it back to the center of the circle.
I know I could do a line command to make a radius out to the circle, then use floodfill to color in the area, but that is risky as the values change, and also I believe there should be a mathematical (geometric) solution that I've overlooked. Anybody?
PS, please don't suggest MS Chart control.
I'm really trying to make add-on object-free apps.
Thanks all.
Wengang