CD_METAFILE

CD - Canvas Draw

CD_PICTURE - CD Picture (cdpicture.h)

This driver allows the creation of a CD Picture. It store primitives and attributes in memory that can be played and resized in any other driver. It does not includes clipping and WriteMode.

Use

The file is created by calling function cdCreateCanvas(CD_PICTURE, Data). The Data parameter is a string that can contain the resolution in the following format:

"[resolution]" or in C use "%lg"

Resolution is the number of pixels per millimeter; its default value is "3.78 pixels/mm" (96 DPI).

The canvas size is automatically calculated to be the bounding box of all the primitives inside the picture.

Any amount of such canvases may exist simultaneously. It is important to note that a call to function cdKillCanvas is required to release the picture memory.

Behavior of Functions

Coordinate System and Clipping

  • Play: implemented.
  • UpdateYAxis: does nothing.
  • Clipping: not supported.
  • Transformation Matrix: not supported.
  • cdGetCanvasSize: returns the size of the bounding box that includes all primitives inside the picture.

Attributes

  • WriteMode: does nothing.
  • FontDim: uses a size estimator, returning approximate values.
  • TextSize: uses a size estimator, returning approximate values.
  • Colors

    Primitives

    • Floating point primitives are supported.

    Client Images

    Server Images

    • All functions do nothing.