PDA

View Full Version : 3D pie-chart calls from Dev-C++



Guillermo Ganem
05-13-2011, 08:06 PM
Hi,

I am developing a Windows project using DevC++ 4.9.9.2, and I have successfully installed GLUT 3.7.6+ graphics library, since I need to include 3D pie-charts in my application.

The pie charts data is determined at run-time depending on user inputs, who may also choose to display one or several pie-charts on the same child window.

My program already processes the queries and fills up all the info to display one (or several) pie charts. I have a "Pie Chart" class that has the graph's titles, legends and total # of slices, + an array of "Pie Slice" (another class), that holds the slice value, % of total, name of slice and color.

I am looking for API-style function calls for pie charts that I can call to display 3D-quality pie charts easily, without reinventing the wheel (and as you can see I am terrible with graphics!). I can accommodate necessary parameters in any way the API functions require.

Some specific questions:
a) Can anybody point me to a Dev-C++ compatible and documented library/resource with this kind of "easy 3D pie-chart" calls? If free or under 100 USD, much better!

b) I am not good at all in GUI environments, and I am quite confused by some Windows issues. In particular:

-> Can I add a pull-down menu (or buttons) at the graphical child pie-chart window? I want to offer the user a chance to Save, Print and Copy-to-clipboard... or should I design my program so that the user instructs beforehand what he wishes to do, since the Pie Chart functions can only display the charts?

-> If I had several pie-charts on the same child-window, will Windows built-in capacities allow the users to move around each pie-chart as a graphical object, or should I assume that the multiple charts will have static positions wherever I choose to position them?

-> Related to previous: will I be able to tell the drawing procedures the total size of each pie-chart (including subtitles, etc...), so that I can calculate that if a letter-document is printed, it will fit?

Sorry for the encyclopaedia, but getting started in graphics can be quite confusing!

Help will be very much appreciated.

Alfonse Reinheart
05-13-2011, 08:48 PM
I am developing a Windows project using DevC++ 4.9.9.2, and I have successfully installed GLUT 3.7.6+ graphics library, since I need to include 3D pie-charts in my application.

Two things. One, DevC++ hasn't been touched in 5 years, and GLUT was abandon-ware almost a decade ago. You may want to consider using tools that are still supported.

Two, 3D pie-charts are something that can be done in SVG. Or really, any 2D window drawing system (Win32's device contexts, Direct2D, whatever Qt and GNOME use, etc). OpenGL is overkill for such an appliance.


I am not good at all in GUI environments, and I am quite confused by some Windows issues. In particular:

Really, these are questions you should take to a Windows developer forum or something similar. Or you should consider looking into some GUI tutorials or a book, so that you can learn how the GUI you're working with works.

OpenGL is not merely "graphics". Nor is OpenGL a "GUI environment" (specifically, GLUT is not OpenGL). It's a specific API for rendering graphics. And it's really not the most appropriate tool for what you're trying to do.

Guillermo Ganem
05-14-2011, 11:02 AM
Thanks for the orientation. Can you provide some suggestions for C++ IDE that are supported and compatible with the code I have already developed under DevC++? Please bear in mind that I have a "normal" laptop since I am not a professional programmer, so I am looking at free/economic tools that don't consume too many resources.

carsten neumann
05-14-2011, 11:17 AM
http://en.wikipedia.org/wiki/Comparison_of_integrated_development_environments which was the first link brought up by google with the query "free windows c++ ide" - hint, hint ;)
Also, the choice of IDE should not have any effect on your code; the choice of GUI framework you pick (Qt, gtk, wxwindows, etc.) has, so choose carefully ;)

ZbuffeR
05-14-2011, 04:11 PM
Try Code::Blocks, AFAIK it is a descendant of DevC++.

Guillermo Ganem
05-17-2011, 07:25 AM
Thanks everybody for your help. There is so much info at the web that it's sometimes hard to find the right stuff!

If useful to other beginners, the combination that worked for me is:

Code::Blocks 10.05 + ChartDirector 5.0, which supports several GUI.