SimplePrintRenderCallback Class Reference

Inheritance diagram for SimplePrintRenderCallback:

RenderCallback CCObject SimpleCCObject List of all members.

Public Member Functions

 SimplePrintRenderCallback (View *pView, Spread *pSpread, BOOL bRenderAll, ScanningRenderRegion *pScanRR, BOOL bDoMasked, BOOL bPrintPaper, INT32 *pNodesSoFar, ProgressDisplay *pProgress)
virtual BOOL BeforeNode (RenderRegion *pRegion, Node *pNode)
virtual BOOL BeforeSubtree (RenderRegion *pRegion, Node *pNode, Node **ppNextNode, BOOL bClip, SubtreeRenderState *pState)

Private Attributes

Viewm_pView
Spreadm_pSpread
ScanningRenderRegionm_pScanRR
Nodem_pFirstComplex
Nodem_pLastComplex
BOOL m_bDoMasked
BOOL m_bRenderAll
BOOL m_bPrintPaper
INT32 * m_pNodesSoFar
ProgressDisplaym_pProgress
BOOL m_bDoComplex

Detailed Description

Definition at line 3268 of file view.cpp.


Constructor & Destructor Documentation

SimplePrintRenderCallback::SimplePrintRenderCallback View pView,
Spread pSpread,
BOOL  bRenderAll,
ScanningRenderRegion pScanRR,
BOOL  bDoMasked,
BOOL  bPrintPaper,
INT32 *  pNodesSoFar,
ProgressDisplay pProgress
[inline]
 

Definition at line 3271 of file view.cpp.

03272     {
03273         m_pView = pView;
03274         m_bRenderAll = bRenderAll;
03275         m_pScanRR = pScanRR;
03276         m_pFirstComplex = pScanRR->GetFirstComplexObject();
03277         m_pLastComplex = pScanRR->GetLastComplexObject();
03278         m_bDoMasked = bDoMasked;
03279         m_bPrintPaper = bPrintPaper;
03280         m_bDoComplex = FALSE;
03281         m_pSpread = pSpread;
03282         m_pNodesSoFar = pNodesSoFar;
03283         m_pProgress = pProgress;
03284     }


Member Function Documentation

virtual BOOL SimplePrintRenderCallback::BeforeNode RenderRegion pRegion,
Node pNode
[inline, virtual]
 

Reimplemented from RenderCallback.

Definition at line 3286 of file view.cpp.

03287     {
03288 //      BOOL bRender = (pNode->IsAnAttribute() || pNode->IsANodeClipView()) && (m_bRenderAll || m_pView->IsPrintableNodeSelected(pNode));
03289         BOOL bRender = m_bRenderAll || m_pView->IsPrintableNodeSelected(pNode);
03290 //      TRACE( _T("SPRC# BeforeNode    0x%08x - %s  returning %s\n", pNode, pNode->GetRuntimeClass()->GetClassName(), bRender ? "true" : "false"));
03291         if (pNode == m_pLastComplex)
03292             m_bDoComplex = TRUE;
03293         return(bRender);
03294     }

virtual BOOL SimplePrintRenderCallback::BeforeSubtree RenderRegion pRegion,
Node pNode,
Node **  ppNextNode,
BOOL  bClip,
SubtreeRenderState pState
[inline, virtual]
 

Reimplemented from RenderCallback.

Definition at line 3296 of file view.cpp.

03297     {
03298 //      TRACE( _T("Warning - SimplePrintRenderCallback::BeforeSubtree called\n") );
03299 //      TRACE( _T("SPRC# BeforeSubtree 0x%08x - %s\n"), pNode, pNode->GetRuntimeClass()->GetClassName());
03300 
03301         if (m_bDoComplex)
03302         {
03303             // We need to render the complex span and start skipping
03304             m_bDoComplex = FALSE;
03305 
03306             DocRect ComplexRect;
03307             DocRect ClipRect = pRegion->GetClipRect();
03308             if (m_bDoMasked)
03309             {
03310                 // Render all the complex bits into a bitmap and mask blit it into the render region
03311                 ComplexRect = m_pScanRR->GetComplexBounds();
03312                 ComplexRect = ComplexRect.Intersection(ClipRect);
03313             }
03314             else
03315             {
03316                 // No masking - just do everything as a rectangular bitmap.
03317                 ComplexRect = ClipRect;
03318             }
03319 
03320             if (ComplexRect.IsValid())
03321             {
03322 //              TRACE( _T("Entire complex span rendered here\n"));
03323 //              TRACE( _T("ComplexRect = (%d, %d) - (%d, %d)\n"), ComplexRect.lo.x, ComplexRect.lo.y, ComplexRect.hi.x, ComplexRect.hi.y);
03324                 // Call RenderBitmapPhase to handle this
03325                 SlowJobResult BitmapResult;
03326                 Matrix ViewTrans = pRegion->GetMatrix();
03327                 BitmapResult = m_pView->RenderBitmapPhase(ComplexRect, ViewTrans, m_pSpread, pRegion,
03328                                                   m_pFirstComplex, m_pLastComplex, m_bRenderAll,
03329                                                   m_bPrintPaper, *m_pProgress);
03330             }
03331         }
03332         
03333         return(FALSE);
03334     }


Member Data Documentation

BOOL SimplePrintRenderCallback::m_bDoComplex [private]
 

Definition at line 3350 of file view.cpp.

BOOL SimplePrintRenderCallback::m_bDoMasked [private]
 

Definition at line 3344 of file view.cpp.

BOOL SimplePrintRenderCallback::m_bPrintPaper [private]
 

Definition at line 3346 of file view.cpp.

BOOL SimplePrintRenderCallback::m_bRenderAll [private]
 

Definition at line 3345 of file view.cpp.

Node* SimplePrintRenderCallback::m_pFirstComplex [private]
 

Definition at line 3342 of file view.cpp.

Node* SimplePrintRenderCallback::m_pLastComplex [private]
 

Definition at line 3343 of file view.cpp.

INT32* SimplePrintRenderCallback::m_pNodesSoFar [private]
 

Definition at line 3347 of file view.cpp.

ProgressDisplay* SimplePrintRenderCallback::m_pProgress [private]
 

Definition at line 3348 of file view.cpp.

ScanningRenderRegion* SimplePrintRenderCallback::m_pScanRR [private]
 

Definition at line 3341 of file view.cpp.

Spread* SimplePrintRenderCallback::m_pSpread [private]
 

Definition at line 3340 of file view.cpp.

View* SimplePrintRenderCallback::m_pView [private]
 

Definition at line 3339 of file view.cpp.


The documentation for this class was generated from the following file:
Generated on Sat Nov 10 04:01:15 2007 for Camelot by  doxygen 1.4.4