#include <ccdc.h>
Inheritance diagram for CCPaintDC:
Public Member Functions | |
CCPaintDC (wxWindow *) | |
Similar to a CPaintDC but also gives us the functionality of a CCDC. In particular we can get at the clipping rectangle list. Constructor for CCPaintDC which gets the update rectangle list before doing a BeginPaint. | |
~CCPaintDC () | |
Destructor for CCPaintDC which does an EndPaint. | |
Private Attributes | |
wxPaintDC | m_DC |
Definition at line 143 of file ccdc.h.
|
Similar to a CPaintDC but also gives us the functionality of a CCDC. In particular we can get at the clipping rectangle list. Constructor for CCPaintDC which gets the update rectangle list before doing a BeginPaint.
Definition at line 507 of file ccdc.cpp. 00507 : CCDC(RENDERTYPE_SCREEN), m_DC(pWnd) 00508 { 00509 // Register this DC with the DC type system and set that it is temporary 00510 CCDC::SetDC(&m_DC, FALSE); 00511 00512 #ifndef EXCLUDE_FROM_XARALX 00513 // Loose the old region data 00514 CCFree( lpRgnData ); 00515 lpRgnData = NULL; 00516 00517 // Setup the DC 00518 // m_pDc = this; 00519 m_clipping = true; 00520 00521 #if defined(__WXMSW__) 00522 // before the BeginPaint we must extract 00523 // the update region. This is so we can more efficiently paint the window, especially after 00524 // diagonal scrolls. 00525 HRGN hRgn = CreateRectRgn(0,0,0,0); 00526 if( hRgn ) 00527 { 00528 INT32 result = ::GetUpdateRgn( HWND(pWnd->GetHandle()), hRgn, FALSE ); 00529 if (result==COMPLEXREGION) 00530 { 00531 // How many regions are there in there 00532 DWORD res = GetRegionData( hRgn, 0, NULL ); 00533 00534 // If there are some and there are less than our limit then get the info about them 00535 if ((res!=0) && (res<MAX_REGIONS)) 00536 { 00537 // alloc space to put the region data in 00538 lpRgnData = (LPRGNDATA)CCMalloc( res ); 00539 if (lpRgnData) 00540 { 00541 // alloced buffer - use it 00542 lpRgnData->rdh.dwSize = sizeof(RGNDATAHEADER); 00543 DWORD newres = GetRegionData( hRgn, res, lpRgnData ); 00544 00545 // Note GetRegionData is documented wrongly - when it works it returns the size, not 1 00546 if (newres!=res) 00547 { 00548 // error occurred somehow so tidy up heap 00549 CCFree( lpRgnData ); 00550 lpRgnData = NULL; 00551 00552 if (newres!=0) 00553 TRACE( _T("GetRegionData changed from %lu to %lu\n"), res, newres); 00554 } 00555 } 00556 } 00557 } 00558 DeleteObject( hRgn ); 00559 } 00560 #endif 00561 #endif 00562 }
|
|
Destructor for CCPaintDC which does an EndPaint.
Definition at line 580 of file ccdc.cpp.
|
|
|