hardcopy - Online Linux Manual PageSection : 3
Updated : Mon Jan 25 2021
Source : Version 3.1.3
Note : Coin
NAMEhardcopy − Vectorized Printing Classes
SYNOPSIS
Classesclass SoHardCopy
The SoHardCopy class is a static class for initializing the hardcopy support. class SoPSVectorOutput
The SoPSVectorOutput class is used for writing Postscript. class SoVectorOutput
The SoVectorOutput class is used for setting vector output file. class SoVectorizeAction
The SoVectorizeAction class is the base class for vectorizing Coin scene graphs. class SoVectorizePSAction
The SoVectorizePSAction class is used for rendering to a Postscript file.
Detailed DescriptionThe vectorized printing classes are for rendering to vector devices instead of raster devices. You can use this to e.g. generate scalable PostScript images for printing instead of raster images that will become pixellated when you scale them up. See below for A HardCopy Overview. A HardCopy Overview The main API for HardCopy support in Coin is the abstract class SoVectorizeAction. SoVectorizeAction will extract geometry from an Inventor scene graph, and project the geometry onto a specified page. Since postscript and other vector based file formats do not support z-buffer or depth clipping, all geometry is rendered using a simple painter's algorithm (geometry is sorted based on distance to camera). SoVectorizePSAction inherits SoVectorizeAction, and will output a Postscript file. Texture-mapped polygons are not supported, since this is not supported by the vector file formats, at least it's not supported in Postscript. Gouraud shading is not supported in the Postscript language (at least not for V2.0), but an approximation is implemeting using an algorithm that divides the triangle into several small (flat-shaded) triangles. The gouraud shading quality (the number of sub-triangles) is controlled by an epsilon value. The gouraud shading function is written by Frederic Delhoume (delhoume (at) ilog.fr), and is free (public domain) software. Typical use of SoVectorizePSAction is shown in the following piece of code: SoVectorizePSAction * ps = new SoVectorizePSAction;
SoVectorOutput * out = ps->getOutput();
if (!out->openFile("output.ps")) {
return -1; // unable to open output file
}
// to enable gouraud shading. 0.1 is a nice epsilon value
// ps->setGouraudThreshold(0.1f);
// clear to white background. Not really necessary if you
// want a white background
ps->setBackgroundColor(TRUE, SbColor(1.0f, 1.0f, 1.0f));
// select LANDSCAPE or PORTRAIT orientation
ps->setOrientation(SoVectorizeAction::LANDSCAPE);
// start creating a new page (A4 page, with 10mm border).
ps->beginPage(SbVec2f(10.0f, 10.0f), SbVec2f(190.0f, 277.0f));
// There are also enums for A0-A10. Example:
// ps->beginStandardPage(SoVectorizeAction::A4, 10.0f);
// calibrate so that text, lines, points and images will have the
// same size in the postscript file as on the monitor.
ps->calibrate(viewer->getViewportRegion());
// apply action on the viewer scenegraph. Remember to use
// SoSceneManager's scene graph so that the camera is included.
ps->apply(viewer->getSceneManager()->getSceneGraph());
// this will create the postscript file
ps->endPage();
// close file
out->closeFile();
delete ps;It is also possible to have several viewports and/or layers on a page. This is useful if your application has several layers of geometry, for instance some annotations in 2D on top of a 3D scene graph. To create several layers, the beginViewport() and endViewport() functions can be used. Since Coin 2.1 TGS provides HardCopy support as a separate extension for TGS Inventor.
AuthorGenerated automatically by Doxygen for Coin from the source code. 0
Johanes Gumabo
Data Size : 11,129 byte
man-hardcopy.3coin3Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 4 / 165,724
Visitor ID : :
Visitor IP : 52.15.49.90 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.