Home > Net > /just a few points about winform redrawn after covering part of the control or WPF control available
/just a few points about winform redrawn after covering part of the control or WPF control available
Time:12-03
Good bosses I work with Winform wrote a control that inherits from the panel, in his onpaint method redraw display images, image size will be very long (line scan camera), to the appearance of the 15 k * 40 k, then I need to do a drawing on the images (resizing, translation, etc., are implemented) Problem: adjusting the upper drawing every time need to redraw the entire panel, when a larger image, shows very slow slow, resulting in adjustment is also very card Then think like WPF, covered with a layer of other controls, set to transparent, but then I cracked No matter by redrawing the upper cover by any means of control, the whole area will refresh, and then at the bottom of the image layer will continue to redraw Want to the next, try 1 hang lower specific time intelligent control: call control. The SuspendLayout (); Useless 2 intercept the message SendMessage (pbxImage. Handle, WM_SETREDRAW, 0, IntPtr. Zero). Useless
Want to ask each big grandma, have what idea can explore
Must use winform, because the image to display a bitmap, the enlarged to see clarity gray, WPF didn't find what method can implement the map
All available 50 points in; (although the bosses don't care
CodePudding user response:
Winform and WPF on the difference between the former use GDI + drawing, the latter with DX, D2D display BMP no problem, not a Canvas control in WPF and Image element,
Use controls in the Winform shade cannot use transparent, transparent transparent, little use, but the custom Region property, put the shade part deducted with related geometric operation method,