-
August 6th, 2014, 05:13 AM
#1
how to paint the graph area in VC++
Hi,
I'm VC++ learner/beginner.
I have a MFC SDI application which will draw the graph from the given data points.
Now I want to add two features to my application.
1. I want to paint the graph region not the whole graph frame. I have attached pic which I want to get from my application.
2. I want to read the binary format file and read the data points to draw the graph.
here we have used DirectX to draw the graph.
Kindly provide your suggestions to solve this issue.
-
August 7th, 2014, 07:06 AM
#2
Re: how to paint the graph area in VC++
1) draw the graph, close it. then use a floodfill.
2) don't draw the upper graph line, rather, draw decenderlines from the graph point down(up) to the the X axis (you can also view this as drawing a bar chart where each bar is 1 pixel wide).
3) use a polygon 'including decenders for the left and right edge down (up) to the x-axis and the X axis. rather than a polyline for just the graph points.
Only this option will work reliably if you want to draw to a printer DC directly.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|