Home > Software engineering >  Use GDI's efficiency
Use GDI's efficiency

Time:09-24

An interface have 30 * 20 sets of data, the data by Graphics DrawString draw on the interface, now find the data every time there are redrawn DrawString take off big time, cause the interface card, do you have what good method to solve,

CodePudding user response:

Although GDI + efficiency is lower, but if the drawing limit within the screen, generally not caton, estimation is not you judge whether beyond the screen, beyond the scope of also to painting (beyond the screen painting also white paint)

CodePudding user response:

reference 1/f, worldy response:
although GDI + efficiency is lower, but if the drawing limit within the screen, generally not caton, estimation is not you judge whether beyond the screen, beyond the scope of also to painting (beyond the screen painting also white paint)

Judgment in the Rect painting of the interface, the data read from the serial port and then postmessage to interface, so the call frequency is very high,

CodePudding user response:

Postmessage each receive a data, you can draw once, efficiency is too low, you think you should use the time to refresh, is quite reasonable

CodePudding user response:

There are 30 * 20 sets of data is what east east?

CodePudding user response:

reference 4 floor schlafenhamster response:
30 * 20 groups of data is what east east?

Is a serial port each receives a frame has 600 int type of data in the data, the 600 data need to update the drawing to the screen

CodePudding user response:

"Every time redrawing DrawString take off big time"
Each redraw to redraw 600?
Put the data into a string of CStringArray, don't every time

CodePudding user response:

Is this related to refresh, you can specify the refresh area, don't refresh all areas,

CodePudding user response:

refer to 6th floor schlafenhamster response:
every time "redraw DrawString take off big time"
Each redraw to redraw 600?
Put the data into a string of CStringArray, don't every time convert

Can be used in a serial port receiving applications,
CArray The dataList;
DataList. The Add ();
Invalidate ().
UpdateWindow ();
In the OnPaint () reads the data and display

CodePudding user response:

Should make sure that what you need is

Such as minimum refresh rate is how much? Or do need each set of data must according to the

In general only display effect, in many cases don't need that high refresh rate, should be enough 500 milliseconds, how also can't see you again

CodePudding user response:

Words to show who can see clearly what data has changed? It is bigger or smaller?

CodePudding user response:

Draw a small area, or don't GDI + use directX

CodePudding user response:

If you use on Windows 7, can consider to Direct2D, it USES the GPU accelerated graphics, and DirectX a speed rating, but than DirectX, easier to use essentially the same, both are called GPU graphics
Or give up GDI +, directly use GDI and GDI than GDI +
In brief in the case of have time request for drawing, had better not use GDI +, it is used to do the GUI are ok, speed is too slow

CodePudding user response:

Everybody is good, what's under the VS2013 and those such as: EASYSIZE tools code, realize the interface with DPI zoom?

CodePudding user response:

reference 13 floor HEXBOSS reply:
hi, what's under the VS2013 and those such as: EASYSIZE tools code, realize the interface with DPI zoom?

WPF?
  • Related