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

Detailed Description

This class represents the print context for a print action.

It is an abstract base class, since Unix, Win32 and MFC handle printing differently. The MFC version is specifically coded to handle print preview in a transparent manner.

Public Member Functions

virtual bool clearClipRectangle ()=0
 
virtual void * drawable (bool rastersPossible)=0
 
virtual bool drawToSurface (double uux1, double uuy1, double uux2, double uuy2, bool clear)=0
 
virtual double duPerMetre () const =0
 
virtual void endPage ()=0
 
virtual double pixelScaling () const =0
 
virtual bool printableArea (TSLEnvelope &area) const =0
 
virtual void printingComplete ()=0
 
virtual bool setClipRectangle (const TSLEnvelope &clip)=0
 
virtual void startPage ()=0
 
virtual TSLDrawingSurfacesurface ()=0
 
virtual ~TSLPrintContext ()=0
 

Constructor & Destructor Documentation

◆ ~TSLPrintContext()

TSLPrintContext::~TSLPrintContext ( )
inlinepure virtual

Member Function Documentation

◆ clearClipRectangle()

virtual bool TSLPrintContext::clearClipRectangle ( )
pure virtual

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

This method should clear the current clip rectangle.

Implemented in TSLMFCPrintContext, and TSLWin32PrintContext.

◆ drawable()

virtual void * TSLPrintContext::drawable ( bool rastersPossible)
pure virtual

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

Implemented in TSLMFCPrintContext, and TSLWin32PrintContext.

◆ drawToSurface()

virtual bool TSLPrintContext::drawToSurface ( double uux1,
double uuy1,
double uux2,
double uuy2,
bool clear )
pure virtual

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.

Implemented in TSLMFCPrintContext, and TSLWin32PrintContext.

◆ duPerMetre()

virtual double TSLPrintContext::duPerMetre ( ) const
pure virtual

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.

Implemented in TSLMFCPrintContext, and TSLWin32PrintContext.

◆ endPage()

virtual void TSLPrintContext::endPage ( )
pure virtual

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

Sends end page message to printer.

Implemented in TSLMFCPrintContext, and TSLWin32PrintContext.

◆ pixelScaling()

virtual double TSLPrintContext::pixelScaling ( ) const
pure virtual

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.

Implemented in TSLMFCPrintContext, and TSLWin32PrintContext.

◆ printableArea()

virtual bool TSLPrintContext::printableArea ( TSLEnvelope & area) const
pure virtual

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.

Implemented in TSLMFCPrintContext, and TSLWin32PrintContext.

◆ printingComplete()

virtual void TSLPrintContext::printingComplete ( )
pure virtual

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

Indicates that printing is complete

Implemented in TSLMFCPrintContext, and TSLWin32PrintContext.

◆ setClipRectangle()

virtual bool TSLPrintContext::setClipRectangle ( const TSLEnvelope & clip)
pure virtual

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.

Implemented in TSLMFCPrintContext, and TSLWin32PrintContext.

◆ startPage()

virtual void TSLPrintContext::startPage ( )
pure virtual

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

Sends start page message to printer.

Implemented in TSLMFCPrintContext, and TSLWin32PrintContext.

◆ surface()

virtual TSLDrawingSurface * TSLPrintContext::surface ( )
pure virtual

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

Query for bound drawing surface.

Implemented in TSLMFCPrintContext, and TSLWin32PrintContext.