Results 1 to 2 of 2
- 10-06-2012, 12:48 AM #1Senior Member
- Join Date
- Aug 2009
- Rep Power
What solution (of these 2) is the fastest way to paint in graphics?
I need to max out the speed of the repainting of some widgets.
So I'm making my own widget system that only contains the things that I need so that it dont calculate unnessecary stuff.
Anyhow, these two solutions both draw same pattern, but which is fastest?
g.drawRect(X, Y, width, height); g.drawLine(X+1, 20, X+width-2, 20);
g.drawRect(X, Y, width, height); g.drawLine(X, 20, X+width, 20);
In number one I remove those two pixels of intersection but at the cost of calculating a new x value twice.'
Which one is the preferred and fastest way to draw this pattern?
- 10-06-2012, 12:58 AM #2
Re: What solution (of these 2) is the fastest way to paint in graphics?
I really don't think you're going to see a major difference in either one. But if you're worried about it, you're going to have to benchmark it for yourself within your own context.
- By Catfish1 in forum New To JavaReplies: 6Last Post: 10-26-2010, 09:57 PM
- By koddy in forum New To JavaReplies: 7Last Post: 06-16-2010, 09:30 AM
- By ingfy in forum New To JavaReplies: 3Last Post: 04-27-2010, 09:51 PM
- By tghn2b in forum New To JavaReplies: 10Last Post: 12-29-2008, 01:11 PM