Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Draw/Paint speed slow
Re: Draw/Paint speed slow [message #39120 is a reply to message #39112] Sat, 16 February 2013 19:47 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Not sure what is your CPU, but mine 2.6Ghz Celeron does it in 25ms.

Do you benchmark it in Optimal mode? (For painter there is a HUGE difference...)

About optimizations:

The only thing that comes to mind is to combine all lines (or those possible with same width and color) lines into single Stroke, something like (quick fix):

		for(int i = 0; i < data.GetCount(); i++) {
			Vector<Pointf>& p = data[i].point;
			sw.Move(x1 + p[0].x, y1 + p[0].y);
	
			cnt2 = p.GetCount();
			
			for(int j = 1; j < p.GetCount(); j++)  
				sw.Line(x1 + p[j].x, y1 + p[j].y);
	
	//		if(data[i].filled)  sw.Fill(data[i].color).EvenOdd(true);
		}
		sw.Stroke(data[0].penwidth, data[0].color);


Anyway, it appears to only improve speed by 10%...

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Crash in Painter
Next Topic: ScatterDraw/ScatterCtrl new features
Goto Forum:
  


Current Time: Thu Mar 28 15:42:21 CET 2024

Total time taken to generate the page: 0.01671 seconds