Re: CPaintDC class



NickP wrote:
Stupid or not, BitBlt will not paint outside the invalid region in a WM_PAINT call. There may be some performance difference when you use the PAINTSTRUCT variable to clip painting yourself, but I have no information on that.

This is interesting, to be safe i'm using the PAINTSTRUCT. Thanks for your help :-)

Actually, it's not matter of safety. Destination DC will clip everything outside clip region anyway. However, by knowing update region beforehand, you can optimize your painting code a little bit by omitting the painting of unnecessary parts of client area.
.



Relevant Pages

  • Re: Custom JPanel that clips children?
    ... I'm able to clip the JPanel, but the children keep painting outside the jpanel parent. ... Do I have to override the paint routines of every child, or is there a way for a parent to clip children? ... I tried overriding every paint method I could find, I even tried commenting out the contents of every paint, repaint, print, update, etc method and the child is still leaving artifacts outside the parent. ... Some Swing painting erroneously uses setClip which will clear any user clipping region. ...
    (comp.lang.java.gui)
  • Re: more spray paint stuff
    ... (clip) Then I use the above touchup gun to do the actual ... painting. ... Gunner, have you tried the fill-it-yourself spray cans they have at Harbor ...
    (rec.crafts.metalworking)