#include <osrndrgn.h>
Inheritance diagram for PaperRenderRegion:
Public Member Functions | |
PaperRenderRegion (DocRect ClipRect, Matrix ConvertMatrix, FIXED16 ViewScale) | |
Construct a PaperRenderRegion - this is a simple derivation from OSRenderRegion's constructor. | |
~PaperRenderRegion () | |
Perform any closedown necessary for the paper render region. | |
BOOL | AttachDevice (View *pView, Spread *pSpread, wxDC *pDC, Matrix &ViewMatrix, FIXED16 ViewScale, DocRect &ClipRect, bool fOwned=false) |
Change the device attached to the PaperRenderRegion. | |
void | DetachDevice () |
Detach the render region form its device. This is done so that we don't try to use the DC etc. after it has been deleted. | |
virtual BOOL | InitDevice () |
Initialise the device specific mechanisms for this render region. |
Definition at line 439 of file osrndrgn.h.
|
Construct a PaperRenderRegion - this is a simple derivation from OSRenderRegion's constructor.
Definition at line 7125 of file osrndrgn.cpp. 07126 : OSRenderRegion(ClipRect, ConvertMatrix, ViewScale) 07127 { 07128 }
|
|
Perform any closedown necessary for the paper render region.
Definition at line 7142 of file osrndrgn.cpp.
|
|
Change the device attached to the PaperRenderRegion.
Definition at line 7166 of file osrndrgn.cpp. 07169 { 07170 if (!OSRenderRegion::AttachDevice(pView, pDC, pSpread)) 07171 return(FALSE); 07172 07173 // Update basic rendering variables for new device. 07174 // (These are normally set up the the constructor). 07175 CurrentClipRect = ClipRect; 07176 RenderMatrix = ViewMatrix; 07177 ScaleFactor = ViewScale; 07178 07179 // Make sure we get rid of all attributes at Detach time - see DetachDevice() below. 07180 SaveContext(); 07181 07182 // Call base class to attach device. 07183 // return OSRenderRegion::AttachDevice(pView, pDC, pSpread); 07184 return(TRUE); 07185 }
|
|
Detach the render region form its device. This is done so that we don't try to use the DC etc. after it has been deleted.
Definition at line 7199 of file osrndrgn.cpp. 07200 { 07201 // Lose all the attributes on our rendering stack 07202 RestoreContext(); 07203 07204 // Lose our current attribute block. 07205 CCFree(CurrentAttrs); 07206 CurrentAttrs = NULL; 07207 07208 // Make sure we don't try to use this device again. 07209 RenderDC = NULL; 07210 RenderView = NULL; 07211 RenderSpread = NULL; 07212 RenderFlags.ValidDevice = FALSE; // make sure InitDevice is called subsequently 07213 // else GBrushes tend not to work 07214 }
|
|
Initialise the device specific mechanisms for this render region.
Thus, this InitDevice has been overridden to check if we should use a palette every* time the RndRgn is initialised for a redraw, so that it will use the palette in the same way as the render regions which are created when needed.
Reimplemented from OSRenderRegion. Definition at line 7244 of file osrndrgn.cpp. 07245 { 07246 // As we use a static PaperRenderRegion, it has to check every time we go to use it if 07247 // we should be using a palette - otherwise, we get the wrong idea when we're Create'd 07248 // and then we fail to use the palette forever onwards! 07249 RFlags.UsePalette = (WantGDIPalette && PaletteManager::UsePalette()) ? TRUE : FALSE; 07250 07251 // Call base class 07252 if (!OSRenderRegion::InitDevice()) 07253 return FALSE; 07254 07255 // All ok 07256 return TRUE; 07257 }
|