all groups > dotnet drawing api > july 2003 >
You're in the

dotnet drawing api

group:

FillPie problem



FillPie problem Konrad R.
7/28/2003 5:51:40 AM
dotnet drawing api: Hi

I want to draw piechart, and have to compute regions that
FillPie function fills (i have to have coordinates of that
regions, not only fill them)

once i am using square as a bounding box all works ok, but
when i switch to ellipse (to draw 3D mode pie chart), it
is a bit strange, please have a look :

http://knr.budowlana.pl/~krotuski/msdn/FlatPie.bmp
http://knr.budowlana.pl/~krotuski/msdn/3DPie.bmp

at first picture (Flat), angle at which green region
starts is less than 45, and on the second one (3D) it
starts at more than 45

those regions are drawn in the same line of code, only
bounding rectangle changes (once it is square, another
time it is rectangle), so i am rather not doing something
wrong

my question is :

how should i calculate coordinates of regions when
piechart is drawn in rectangle (as ellipse) to be
correct ??

Re: FillPie problem Gerben van Loon
7/28/2003 4:01:51 PM
Hi,

Dunno the solution to your problem. But if you want to draw a pie chart, wy
don't you use ChartFX lite:

http://eu.softwarefx.com/sfxgallery/chartdetail.asp?charttype=4&currentchart=2

It's free and you can draw pie charts with it..... no hard coding for your
self ;)

greets

[quoted text, click to view]

FillPie problem Konrad R.
7/29/2003 1:58:48 AM
ok, here are another pictures, i put in those a line which
i consider 45 degrees, now it should be clear, that green
region once starts before 45 degrees, and when using
ellipse, it starts after 45 degrees

any ideas ?
FillPie problem Konrad R.
7/29/2003 2:35:42 AM
i forgot about pictures :

http://knr.budowlana.pl/~krotuski/msdn/3DPie2.bmp
AddThis Social Bookmark Button