CD_DEBUG - CD Debug Driver (cddebug.h)

This driver creates a text file with a log of all function calls. But for only the functions that have a driver implementation and in the order that the driver implements sequece of functions like Begin/Vertex/End. Pointers are stored as addresses, and definitions are stored as the CD definition "CD_XXX".

Use

The file is created by calling function cdCreateCanvas(CD_DEBUG, Data). The Data parameter is a string that must contain the filename and the canvas dimensions, in the following format:

"filename [width_mmxheight_mm] [resolution]" or in C use "%s %gx%g %g"

Only the parameter filename is required. The filename must be inside double quotes (") if it has spaces. width_mm and height_mm are provided in millimeters (note the lowercase "x" between them), and their default value in pixels is INT_MAX for both dimensions. 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.

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.

Behavior of Functions

Coordinate System and Clipping

Attributes

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