Alphabetical Class Index   File Members   Compound Members   File List  

HIOUtilityGDIOutput Class Reference

The HIOUtilityGDIOutput class should be used for exporting data to a Windows Printer or Clipboard Device Context (DC). More...

#include <HIOUtilityGDIOutput.h>

Public Member Functions

void RegisterOutputHandlerTypes ()
 registers the 'emf' output type
 
const char * GetOutputName ()
 
const char * GetOutputTypesString ()
 
HOutputHandlerStyle GetOutputStyle ()
 
HFileOutputResult FileOutputByKey (const char *FileName, HC_KEY key, HOutputHandlerOptions *options)
 
HFileOutputResult FileOutputByKey (unsigned short const *FileName, HC_KEY key, HOutputHandlerOptions *options)
 
HFileOutputResult FileOutputByKey (const __wchar_t *FileName, HC_KEY key, HOutputHandlerOptions *options)
 
HFileOutputResult DoClipBoard (const wchar_t *FileName, HC_KEY key, GDIExportInformation *options)
 
HFileOutputResult DoPrinter (const wchar_t *FileName, HC_KEY key, GDIExportInformation *options)
 
HFileOutputResult FileOutputFromImageKey (const char *FileName, HC_KEY key, HOutputHandlerOptions *options)
 
HFileOutputResult FileOutputFromImageKey (unsigned short const *FileName, HC_KEY key, HOutputHandlerOptions *options)
 
HFileOutputResult FileOutputFromImageKey (const __wchar_t *FileName, HC_KEY key, HOutputHandlerOptions *options)
 

Detailed Description

The HIOUtilityGDIOutput class should be used for exporting data to a Windows Printer or Clipboard Device Context (DC).

Via the GDIExportInformation structure you supply the id to the device context, the window handle and a bool indicating whether or not this is export to a clipboard or printer DC. The code queries the device and repositions subwindows to ensure we get WYSIWYG printing. This code should be used as a reference for developers who want to get WYSIWYG printing of their subwindows.

The printing code employs a multi-pass render approach where it first creates an image of all the data which would be sent down as rasters when rendered to a clipboard or printer DC and then sends down the rest of the (vector) data after first passing it through a hidden surface removal algorithm to ensure it is sorted correctly wrt to the data in the image. Using this appraoch means that the image and shaded geometry in the scene will be sent down in one quik BitBlit while the remaining polylines, edges, text and markers will be sent down as vector primitives. This results in high quality hardcopy and clipboard output.

The 'bConserveMemory' boolean of GDIExportInformation controls whether the raster portion of the hardcopy should be sent to the printer in small chunks (bands), to help reduce the memory footprint required during the hardcopy generation. This option ONLY affects the rasters that are part of the 'background' raster image send to the printer during the multi-pass print mechanism.

The resolution of the 'raster' portion of the output is controlled via the 'image_dpi' member of GDIExportInformation.

Member Function Documentation

HFileOutputResult HIOUtilityGDIOutput::DoClipBoard ( const wchar_t *  FileName,
HC_KEY  key,
GDIExportInformation options 
)

This function is for Copy to Clipboard

Parameters
FileNameA character pointer denoting the name of the file to be read in
keyThis is typically unused
optionsYou pass in the HBaseView pointer, the camera setting, the device context and the hWnd within this structure
Returns
result of operation
HFileOutputResult HIOUtilityGDIOutput::DoPrinter ( const wchar_t *  FileName,
HC_KEY  key,
GDIExportInformation options 
)

This function is for printing

Parameters
FileNameA character pointer denoting the name of the file to be read in
keyThis is typically unused
optionsYou pass in the HBaseView pointer, the camera setting, the device context and the hWnd within this structure
Returns
result of operation
HFileOutputResult HIOUtilityGDIOutput::FileOutputByKey ( const char *  FileName,
HC_KEY  key,
HOutputHandlerOptions *  options 
)
inline

This function should be used for all GDI Print and Copy to Clipboard work

Parameters
FileNameA character pointer denoting the name of the file to be read in
keyThis is typically unused
optionsYou pass in the HBaseView pointer, the camera setting, the device context and the hWnd within this structure
Returns
result of operation
HFileOutputResult HIOUtilityGDIOutput::FileOutputFromImageKey ( const char *  FileName,
HC_KEY  key,
HOutputHandlerOptions *  options 
)
inline

overloaded; returns OutputNotHandled

HOutputHandlerStyle HIOUtilityGDIOutput::GetOutputStyle ( )
inline
Returns
A character pointer denoting the name of the handler.
The styles of model exported by this handler.
const char* HIOUtilityGDIOutput::GetOutputTypesString ( )
inline
Returns
The file extensions which may be created by this handler.

The documentation for this class was generated from the following file: