From 7b52cc13af4e85f1ca2deb6b6c77de9c95ea0dcf Mon Sep 17 00:00:00 2001 From: scuri Date: Fri, 17 Oct 2008 06:10:33 +0000 Subject: First commit - moving from LuaForge to SourceForge --- html/en/drv/cgm.html | 184 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 184 insertions(+) create mode 100644 html/en/drv/cgm.html (limited to 'html/en/drv/cgm.html') diff --git a/html/en/drv/cgm.html b/html/en/drv/cgm.html new file mode 100644 index 0000000..17ca141 --- /dev/null +++ b/html/en/drv/cgm.html @@ -0,0 +1,184 @@ + + + + + + +CD_CGM + + + + + +

CD_CGM - Computer Graphics Metafile Driver (cdcgm.h)

+ +

This driver allows generating a Computer Graphics Metafile, which is an ANSI standard for the persistent storage of + graphics primitives. The file usually has an extension .CGM.

+ +

Use

+ +

The file file is created by means of a call to the function + cdCreateCanvas(CD_CGM, + Data), which opens the file and writes its header. Then, other functions in the CD library can be called + as usual. The Data parameter string has the following format:

+ +
"filename [widthxheight] [resolution] [-t] -p[precision]" or in C style "%s %gx%g %g %s"
+ +

Only the parameter filename is required. The filename must be inside double quotes (") + if it has spaces. Width and height are provided in millimeters + (note the lowercase "x" between them), and their default value in pixels is INT_MAX for + both dimensions. When the canvas' size is not specified, the VDC Extension saved to the file is the image's bounding + rectangle. The resolution is the number of pixels per millimeter; its default value is "3.78 pixels/mm" (96 DPI). + Width, height and resolution are + real values. Width, height and resolution + are used only by cdGetCanvasSize and in pixel-millimeter conversion. + Parameter -t modifies the codification. Parameter -p specifies + the precision of integers, which can be 16 (default) or 32.

+

Any amount of such canvases may exist simultaneously. It is important to note that a call to function + + cdKillCanvas is required to close the file properly.

+

Coding - The CGM format supports binary and text coding. If you are not sure what to do, use + binary coding, which is the default. Should you prefer text coding, add a "-t" string to + the Data parameter.

+

Precision of Coordinates - The primitives can use coordinates in real numbers. However, for + compatibility reasons, we use coordinates in integers.

+ +

Behavior of Functions

+

Control 

+ +

Coordinate System and Clipping

+ +

Primitives

+ +

Attributes

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Font Mapping
CD FontsGenerated Font Names
CD_PLAINCD_BOLDCD_ITALICCD_BOLD|CD_ITALIC
"System""SYSTEM""SYSTEM_BOLD""SYSTEM_ITALIC""SYSTEM_BOLDITALIC"
"Courier""COURIER" "COURIER_BOLD" "COURIER_ITALIC" "COURIER_BOLDITALIC"
"Times""TIMES_ROMAN" "TIMES_ROMAN_BOLD""TIMES_ROMAN_ITALIC""TIMES_ROMAN_BOLDITALIC"
"Helvetica""HELVETICA" "HELVETICA_BOLD""HELVETICA_ITALIC""HELVETICA_BOLDITALIC"
+
+
+

Colors

+ +

Client Images 

+ +

Server Images

+ + + + + -- cgit v1.2.3