PrintBase CATPrintImage

Usage: you can derive this class.


public class CATPrintImage

Abstract class to build a print image.

Role: This class has to be derived to build an image. The and methods must be overridden.
The method can be overriden. By default, it initializes the device, calls method and ends the device.


Constructor and Destructor Index


o CATPrintImage()
Constructs a CATPrintImage.
o ~CATPrintImage()

Method Index


o CreatePrintableImage(void)
Creates a CATIPrintable implementation.
o Decode(CATPrintGenerator*,CATPrintParameters&)
Computes the print image with the appropriate generator and parameters (virtual pure method).
o GetDescription(void)
Returns the description of the image.
o GetSize(float&,float&)
Retrieves the size of the file image (virtual pure method).
o GetTitle(CATUnicodeString&)
Returns the title of the image.
o Print(HDC,int)
Initializes the device, decodes and prints the image.
o Print(HDC,CATPrintParameters&,int)
Initializes the device, decodes and prints the image.
o Print(CATPrintDevice*,CATPrintParameters&)
Initializes the device, decodes and prints the image.
o RenderFormat(CLIPFORMAT,float)
Renders to the specified clipboard format.
o SetDescription(CATUnicodeString&)
Sets the description of the image.
o SetTitle(CATUnicodeString&)
Sets the title of the image.

Constructor and Destructor


o CATPrintImage
public CATPrintImage()
Constructs a CATPrintImage.
o ~CATPrintImage
public virtual ~CATPrintImage()

Methods


o CreatePrintableImage
public virtual CreatePrintableImage( )
Creates a CATIPrintable implementation.
Returns:
The CATPrintImage created.
o Decode
public virtual Decode( iGenerator,
const iParameters)
Computes the print image with the appropriate generator and parameters (virtual pure method).
This method must be overridden.
Parameters:
iGenerator
The generator.
iParameters
The print parameters.
Returns:
The status of the method.
Legal values: 0 -> KO, 1 -> OK.
o GetDescription
public virtual GetDescription( )
Returns the description of the image.
Returns:
The description of the image.
o GetSize
public virtual GetSize( oWidth,
oHeight)
Retrieves the size of the file image (virtual pure method).
This method must be overridden.
Parameters:
oWidth
The width of the image.
oHeight
The height of the image.
Returns:
The status of the method.
Legal values: 0 -> KO, 1 -> OK.
o GetTitle
public virtual GetTitle( oTitle)
Returns the title of the image.
Parameters:
oTitle
The title of the image.
Returns:
The status of the method.
Legal values: 0 -> KO, 1 -> OK.
o Print
public virtual Print( iHDC,
iFnMapMode= MM_ANISOTROPIC)
Initializes the device, decodes and prints the image.
Parameters:
iHDC
The current HDC.
iFnMapMode
The mapping mode.
Legal values: MM_HIMETRIC specific for Windows NT, MM_LOMETRIC specific for Windows 98 or MM_ANISOTROPIC for both. The default is MM_ANISOTROPIC.
Returns:
The status of the method.
Legal values: 0 -> KO, 1 -> OK.
o Print
public virtual Print( iHDC,
const iParameters,
iFnMapMode= MM_ANISOTROPIC)
Initializes the device, decodes and prints the image.
Parameters:
iHDC
The current HDC.
iParameters
The print parameters.
iFnMapMode
The mapping mode.
Legal values: MM_HIMETRIC specific for Windows NT, MM_LOMETRIC specific for Windows 98 or MM_ANISOTROPIC for both. The default is MM_ANISOTROPIC.
Returns:
The status of the method.
Legal values: 0 -> KO, 1 -> OK.
o Print
public virtual Print( iDevice,
const iParameters)
Initializes the device, decodes and prints the image.
Parameters:
iDevice
The device on which the image will be printed.
iParameters
The print parameters.
Returns:
The status of the method.
Legal values: 0 -> KO, 1 -> OK.
o RenderFormat
public virtual RenderFormat( iClipFormat,
iScale= 0.f)
Renders to the specified clipboard format.
Parameters:
iClipFormat
The clipboard format.
Legal values: CF_METAFILEPICT for Windows Metafile, CF_ENHMETAFILE for Enhanced Metafile, or CF_BITMAP for Bitmap Format.
iScale
The applicated scale.
Legal values: The default is 0 then the scale is calculated.
Returns:
The handle on the clipboard format.
o SetDescription
public virtual SetDescription( const iDescription)
Sets the description of the image.
Parameters:
iDescription
The description of the image.
o SetTitle
public virtual SetTitle( const iTitle)
Sets the title of the image.
Parameters:
iTitle
The title of the image.

This object is included in the file: CATPrintImage.h
If needed, your Imakefile.mk should include the module: CATPrintBase

Copyright © 1999-2014, Dassault Systèmes. All rights reserved.