DG Kernel Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
Overview of the software
What is new
Licensing
Collapse ModelsModels
Collapse DG Kernel ComponentsDG Kernel Components
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
Collapse ModelModel
Collapse ViewView
Collapse General ComputingGeneral Computing
Collapse Samples and TutorialsSamples and Tutorials
Collapse GraphicsGraphics
Collapse Math ObjectsMath Objects
Collapse DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation Links Search Documentation


Printing Support

DG Kernel views can be printed using IPrint_KC obtained via: DG Kernel > GetView > IView > IPrint_KC.

When the view is two dimensional, the 2D scene can be saved in true Extended Windows Metafile (.emf) or Windows Metafile (.wmf) formats and used as an embedded part of a document. To save 2D scene as a metafile use .emf or .wmf file name extension in a call to the SaveAs method of the component. 

When a IPrint_KC is acquired DG Kernel creates a separate two dimensional view (Printing View), which can be acquired with IPrint_KC.Get2DView

Above allows modification of printer-specific settings separate from setting for the component window, which are most often quite different because of the difference in resolution and shape of the displayed area. The settings can be accessed via:

IPrint_KC -> IPrint_KC.Get2DView. ->I2DView_KC -> I2DView_KC.GetContext -> IKCContext. -> 2D View Properties

When the printing view is first created its settings are copied form the 2D View of the components window. The Printing View along with all selected settings is destroyed when the last reference to the 2D view is released by the application (goes out of scope). Store reference to I2DView_KC or any queried form it interfaces in an object with long life span to keep it alive.

To embed a high resolution  image generated by a 3D view into a printed document use IVirtualView to render into a bitmap with arbitrary resolution and insert the bitmap into the document, with possible conversion to a compressed 2D picture format. See also Capture Sample