GRenderClickColourNoPaper Class Reference

Special version of a GRenderClick that renders into a colour bitmap. It is used for hit-detection. The only difference between this and GRenderClickColour is that when it attaches to a CCDC that CCDC's NeedsPaper function will return FALSE. More...

#include <grndclik.h>

Inheritance diagram for GRenderClickColourNoPaper:

GRenderClickColour GRenderClick GRenderDIB GRenderRegion RenderRegion ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 GRenderClickColourNoPaper (DocRect ClipRegion, Matrix ConvertMatrix, FIXED16 ViewScale, UINT32 Depth, double dpi)
 Constructor. Most important jobs are to set the VeryMono flag to FALSE, and to set m_DoCompression = TRUE to ensure correct handling of transparencies.
 ~GRenderClickColourNoPaper ()
 Destructor. Simple cleanup, which involves calling our base classes.

Private Member Functions

BOOL AttachDevice (View *, wxDC *, Spread *SpreadToAttach=NULL, bool fOwned=false)
 Most work done in base class, except for the creation of a CCDC member.

Friends

class OSRenderBitmap

Detailed Description

Special version of a GRenderClick that renders into a colour bitmap. It is used for hit-detection. The only difference between this and GRenderClickColour is that when it attaches to a CCDC that CCDC's NeedsPaper function will return FALSE.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/03/2004

Definition at line 202 of file grndclik.h.


Constructor & Destructor Documentation

GRenderClickColourNoPaper::GRenderClickColourNoPaper DocRect  ClipRegion,
Matrix  ConvertMatrix,
FIXED16  ViewScale,
UINT32  Depth,
double  dpi
 

Constructor. Most important jobs are to set the VeryMono flag to FALSE, and to set m_DoCompression = TRUE to ensure correct handling of transparencies.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/03/2004
Parameters:
A clip region, conversion matrix, scale and bitmap depth. [INPUTS]
None [OUTPUTS]
Returns:
None
Do not call directly, use OSRenderBitmap::Create

Definition at line 183 of file grndclik.cpp.

00184     : GRenderClickColour(ClipRegion, ConvertMatrix, ViewScale, Depth, dpi)
00185 {
00186     RenderFlags.VeryMono = FALSE;               // simple black&white rendering NOT !!!!!
00187     RenderFlags.HitDetect = TRUE;
00188     m_DoCompression = TRUE;
00189     ClearOnStart = FALSE;
00190 }

GRenderClickColourNoPaper::~GRenderClickColourNoPaper  ) 
 

Destructor. Simple cleanup, which involves calling our base classes.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/03/2004

Definition at line 248 of file grndclik.cpp.

00249     : ~GRenderClick()
00250 {
00251 
00252 }


Member Function Documentation

BOOL GRenderClickColourNoPaper::AttachDevice View pView,
wxDC *  DCToAttach,
Spread SpreadToAttach = NULL,
bool  fOwned = false
[private, virtual]
 

Most work done in base class, except for the creation of a CCDC member.

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/10/99
Parameters:
pView is used for debug purposes only. DCToAttach is used as a [INPUTS] reference when making the bitmap.
Returns:
FALSE if failed (no mem for bitmap or CCDC), TRUE if OK

Reimplemented from GRenderClickColour.

Definition at line 707 of file grndclik.cpp.

00708 {
00709 
00710     // call base class first
00711     if (!GRenderDIB::AttachDevice(pView, DCToAttach, SpreadToAttach, fOwned))
00712         return FALSE;
00713 /*          
00714     // now replace the usual RenderDC with our new one. This makes the type of the CCDC
00715     // correct, so Quality rendering works correctly, for example.
00716     TRY
00717     {
00718         // IMPORTANT: we 'borrow' the HDC from DCToAttach. We must take care when
00719         // deleting this not to delete the HDCs (see the constructor).
00720         RenderDC = new CCDC( DCToAttach, RENDERTYPE_HITDETECT );
00721     }
00722     CATCH (CMemoryException, e)
00723     {
00724         // Ooer - not enough memory
00725         TRACEALL( _T("No memory for CCDC in GRenderClickColour::AttachDevice") );
00726         return FALSE;
00727     }
00728     END_CATCH
00729 */
00730     RenderDC = new wxBufferedDC() ;
00731     m_fOwned = true;
00732 
00733     return TRUE;
00734 }


Friends And Related Function Documentation

friend class OSRenderBitmap [friend]
 

Reimplemented from GRenderClickColour.

Definition at line 204 of file grndclik.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:54:58 2007 for Camelot by  doxygen 1.4.4