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

Public Member Functions

 TSLWin32PrintContext (HDC dc)
 
virtual ~TSLWin32PrintContext ()
 
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
 

Protected Attributes

HDC m_dc
 
int m_dcStack
 
HRGN m_hrgn
 
TSLNTSurfacem_surface
 
bool m_rastersPossible
 

Constructor & Destructor Documentation

◆ TSLWin32PrintContext()

TSLWin32PrintContext::TSLWin32PrintContext ( HDC dc)
inline

Constructor for the Win32 specific implementation of the print context.

Parameters
dcDevice context to bind to.

Class TSLWin32PrintContext

◆ ~TSLWin32PrintContext()

TSLWin32PrintContext::~TSLWin32PrintContext ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ clearClipRectangle()

bool TSLWin32PrintContext::clearClipRectangle ( )
inlinevirtual

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

This method should clear the current clip rectangle.

Implements TSLPrintContext.

◆ drawable()

void * TSLWin32PrintContext::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 TSLWin32PrintContext::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 the specified area of the 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 TSLWin32PrintContext::duPerMetre ( ) const
inlinevirtual

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

Query the 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 TSLWin32PrintContext::endPage ( )
inlinevirtual

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

Sends an end page message to printer.

Implements TSLPrintContext.

◆ pixelScaling()

double TSLWin32PrintContext::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 TSLWin32PrintContext::printableArea ( TSLEnvelope & area) const
inlinevirtual

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

Query for the printable device unit area.

Parameters
areaStorage for printable area, in device units.

Implements TSLPrintContext.

◆ printingComplete()

void TSLWin32PrintContext::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 TSLWin32PrintContext::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 TSLWin32PrintContext::startPage ( )
inlinevirtual

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

Sends a start page message to printer.

Implements TSLPrintContext.

◆ surface()

TSLDrawingSurface * TSLWin32PrintContext::surface ( )
inlinevirtual

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

Query for the bound drawing surface.

Implements TSLPrintContext.

Member Data Documentation

◆ m_dc

HDC TSLWin32PrintContext::m_dc
protected

Data Members for Class Attributes This is the DC associated with the printer.

◆ m_dcStack

int TSLWin32PrintContext::m_dcStack
protected

Private attribute storing the ID of the DC. Used to avoid contaminating the DC passed in.

◆ m_hrgn

HRGN TSLWin32PrintContext::m_hrgn
protected

Private attribute, used to provide clipping for TSLPrintItems.

◆ m_rastersPossible

bool TSLWin32PrintContext::m_rastersPossible
protected

◆ m_surface

TSLNTSurface* TSLWin32PrintContext::m_surface
protected

Private attribute storing temporary Drawing Surface used during printing.