MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLMFCPrintContext Class Reference
Inheritance diagram for TSLMFCPrintContext:

Detailed Description

needed for CPreviewDC This class represents the print context for a print action in an MFC application.

Since MFC modifies the Window Mapping Mode during Print Preview, this Print Context uses the information given to ensure valid output.

Public Member Functions

 TSLMFCPrintContext (CDC *cdc, CPrintInfo *printInfo)
 
 ~TSLMFCPrintContext ()
 
virtual bool clearClipRectangle ()
 
virtual void * drawable (bool rastersPossible)
 
virtual bool drawToSurface (double uux1, double uuy1, double uux2, double uuy2, bool clear)
 
virtual double duPerMetre () const
 
virtual void endPage ()
 
virtual double pixelScaling () const
 
virtual bool printableArea (TSLEnvelope &area) const
 
virtual void printingComplete ()
 
virtual bool setClipRectangle (const TSLEnvelope &clip)
 
virtual void startPage ()
 
virtual TSLDrawingSurfacesurface ()
 
- Public Member Functions inherited from TSLPrintContext
virtual ~TSLPrintContext ()=0
 

Constructor & Destructor Documentation

◆ TSLMFCPrintContext()

TSLMFCPrintContext::TSLMFCPrintContext ( CDC * cdc,
CPrintInfo * printInfo )
inline

Constructor for the MFC specific implementation of the print context.

Parameters
cdcDevice context class to bind to
printInfoPointer to printer information

Class TSLMFCPrintContext

◆ ~TSLMFCPrintContext()

TSLMFCPrintContext::~TSLMFCPrintContext ( )
inline

Destructor.

Member Function Documentation

◆ clearClipRectangle()

bool TSLMFCPrintContext::clearClipRectangle ( )
inlinevirtual

NOTE : This method is used by the TSLPrintHelper and should NOT be called by user code.

This method clears the current clip rectangle.

Implements TSLPrintContext.

◆ drawable()

void * TSLMFCPrintContext::drawable ( bool rastersPossible)
inlinevirtual

NOTE : This method is used by the TSLPrintHelper and should NOT be called by user code.

Query for the drawable associated with the context.

Parameters
rastersPossibleTrue if the display potentially contains rasters - some printers have issues with this.
Returns
DC on NT

Implements TSLPrintContext.

◆ drawToSurface()

bool TSLMFCPrintContext::drawToSurface ( double uux1,
double uuy1,
double uux2,
double uuy2,
bool clear )
inlinevirtual

NOTE : This method is used by the TSLPrintHelper and should NOT be called by user code.

Draw specified area of surface.

Parameters
uux1,uuy1,uux2,uuy2Corners of area to draw
clearIf true, clear area before drawing.
Returns
true on success, false otherwise.

Implements TSLPrintContext.

◆ duPerMetre()

double TSLMFCPrintContext::duPerMetre ( ) const
inlinevirtual

NOTE : This method is used by the TSLPrintHelper and should NOT be called by user code.

Query number of device units per metre, of the associated device. This is used when printing to a particular scale.

Returns number of device units per metre.

Implements TSLPrintContext.

◆ endPage()

void TSLMFCPrintContext::endPage ( )
inlinevirtual

NOTE : This method is used by the TSLPrintHelper and should NOT be called by user code.

Sends end page message to printer.

Implements TSLPrintContext.

◆ pixelScaling()

double TSLMFCPrintContext::pixelScaling ( ) const
inlinevirtual

NOTE : This method is used by the TSLPrintHelper and should NOT be called by user code.

Queries for the pixel scaling factor when in anisotropic mode - adjusts for print preview to screen. This is required since LeadTools is unable to handle anisotropic mode and so we must render into a bitmap, but adjust pixel based dimensions accordingly.

Implements TSLPrintContext.

◆ printableArea()

bool TSLMFCPrintContext::printableArea ( TSLEnvelope & area) const
inlinevirtual

NOTE : This method is used by the TSLPrintHelper and should NOT be called by user code.

Query for printable device unit area.

Parameters
areaStorage for printable area, in device units.

Implements TSLPrintContext.

◆ printingComplete()

void TSLMFCPrintContext::printingComplete ( )
inlinevirtual

NOTE : This method is used by the TSLPrintHelper and should NOT be called by user code.

Indicates that printing is complete

Implements TSLPrintContext.

◆ setClipRectangle()

bool TSLMFCPrintContext::setClipRectangle ( const TSLEnvelope & clip)
inlinevirtual

NOTE : This method is used by the TSLPrintHelper and should NOT be called by user code.

This method should set the specified clip rectangle to compensate for any logical->physical mapping that may be in effect.

Parameters
clipClip rectangle to set

This is particularly required to handle print preview under MFC.

Implements TSLPrintContext.

◆ startPage()

void TSLMFCPrintContext::startPage ( )
inlinevirtual

NOTE : This method is used by the TSLPrintHelper and should NOT be called by user code.

Sends start page message to printer.

Implements TSLPrintContext.

◆ surface()

TSLDrawingSurface * TSLMFCPrintContext::surface ( )
inlinevirtual

NOTE : This method is used by the TSLPrintHelper and should NOT be called by user code.

Query for bound drawing surface.

Implements TSLPrintContext.