Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Drawing performance issue
Re: Drawing performance issue [message #43148 is a reply to message #43147] |
Mon, 19 May 2014 11:47  |
|
Hi crydev,
Here's few tricks that I deployed successfully in past:
- Don't draw anything that is not visible (out of viewport, overlapped by other shapes).
- Don't draw details that can't be visible on screen. Only use high level of detail when you export images or print.
- Use clever algorithms. Sometimes images can be generated much faster going pixel by pixel than using lines and other drawing primitives.
In your particular case with Koch curve, I think the best would be to apply the second optimization. Only use enough iterations so that length of the line is more than one pixel. If you need the data for some subsequent operations, you could also add conditions to only use point when its distance from last drawn point is more than 1 pixel (or 0.5pixel, it might look better).
Best regards,
Honza
|
|
|
Goto Forum:
Current Time: Mon May 12 22:53:02 CEST 2025
Total time taken to generate the page: 0.03929 seconds
|