How to improve graphical refresh efficiency?

xiaoxiao2021-04-03  213

Now do a vector drawing software, because of a large number of graphic editing operations, the editing speed has become the most headache problem.

Take translational operations for a graphic as an example, you need to refresh the two areas, one is the area where the graph is the original position, one is the area behind graphics, the algorithm is as follows:

// Improve the drawing efficiency and prevent flashing using dual DC

CRECT RC;

Calculate the regional RC of the original position of the graph;

The RC area of ​​the multi-memory DC multi-color page;

Calculate the regional RC after the graphic movement;

The RC area of ​​the multi-memory DC multi-color page;

Update the memory DC to the screen DC;

However, it is found that such refresh efficiency is very low, especially when there is a large number of graphics on the page, the redrack page may result in a large number of graphics heavy draws. But there is no better refresh method without heavy painting. Later, I changed the above algorithm, and then combined with the two areas and then once again, but the efficiency did not show an increase. I don't know if there is a better refresh method?

转载请注明原文地址:https://www.9cbs.com/read-131595.html

New Post(0)