rliq
March 29th, 2005, 03:02 AM
Given that I have a CPen of thickness m_nThickness and have already selected it to the Device Context. What is the technique for finding the EXACT bounding Rectangle painted when I do a...
pDC->Rectangle( s_rect );
I have tried using the s_rect, tried inflating it (based on m_nThickness) etc etc, but there always seems to be a scenario where I lose one pixel along an edge or two or three or four.
I am painting many things front to back (to avoid flicker when the window is being resized) and need to detmine the EXACT rectangle to remove from the Update Region.
Or does somebody have another technique all together? Is a technique to paint from back to front (because I can already do this perfectly) on a CompatibleDC and then Blit it over the main one?
Thanks
pDC->Rectangle( s_rect );
I have tried using the s_rect, tried inflating it (based on m_nThickness) etc etc, but there always seems to be a scenario where I lose one pixel along an edge or two or three or four.
I am painting many things front to back (to avoid flicker when the window is being resized) and need to detmine the EXACT rectangle to remove from the Update Region.
Or does somebody have another technique all together? Is a technique to paint from back to front (because I can already do this perfectly) on a CompatibleDC and then Blit it over the main one?
Thanks