|
-
Feb 17th, 2005, 03:55 PM
#1
Thread Starter
Frenzied Member
drawing
I plan on writing an app that will graph polynomial expressions. My question is, what should I draw the graph on? Should I just use the regular frame and use DrawLine(), or is there something like a bitmap, or canvas thing I should use?
-
Feb 18th, 2005, 05:07 AM
#2
Re: drawing
I think you should definitely use an offscreen BufferedImage and blit that to the screen on drawing.
I've seen a graph library that doesn't - at 30000 plotted points, every movement of the window is about 4 seconds delayed.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Feb 18th, 2005, 06:14 AM
#3
Thread Starter
Frenzied Member
-
Feb 19th, 2005, 08:11 AM
#4
Thread Starter
Frenzied Member
Re: drawing
I created the bufferedImage in a seperate class that extended JPanel(Called ImagePlotter)...I did this in the "driver" class trying to create an instance of it, and adding it to the container, but it's not showing up.
ImagePlotter ip = new ImagePlotter();
Container pane = getContentPane();
pane.add(ip);
is this how I was suppose to do this?
-
Feb 20th, 2005, 01:55 PM
#5
Thread Starter
Frenzied Member
Re: drawing
I just went with painting the component since the bufferedImage wouldn't work..But I have one more question: If I have the cartisian coordiante plane drawn, would it be possible to only repaint one line graphed on it, instead of everything in the paintComponent method?
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
|