This driver represents a basic driver for all system-dependent drivers
+ implemented in the X-Windows system. The implementation uses the
+ GDK and
+ Cairo API
+ functions. This driver was designed for the GTK+ version 2, and can be
+ compiled and used in Microsoft Windows system.
+
+ UpdateYAxis: the
+ orientation of axis Y is the opposite to its orientation in the CD library.
+
+
Attributes
+
+
+
+ LineWidth: if
+ width is 1, the driver will use 0 for a better
+ performance.
+
+
+ LineStyle: thick lines have
+ style only in the line's direction. For example, you will see small rectangles
+ in a thick dotted line.
+
+
+ NativeFont: also accepts the
+ X-Windows font string format. A scaled font is generated using the font size
+ and the font face.
+
+ Font: the old name "System"
+ is mapped to "fixed". A scaled font is generated using the font size
+ and the font face.
+
+
Colors
+
+
+
+ Palette: When the number of
+ bits per pixel is smaller than or equal to 8, the driver will use the system
+ palette to solve colors passed as parameters to the canvas. The driver
+ allocates colors as they are requested - if a color cannot be allocated, the
+ closest color is used in the palette. For such, the driver sees all available
+ colors, in the current application and others. If one of the applications is
+ terminated, a color in the palette may become invalid and will only be updated
+ by the driver when it is requested again. For this reason, a call to
+ cdForeground or cdBackground or cdPalette
+ is recommended before drawing.
+ When CD_FORCE is used, the driver forces color allocation.
+ This may imply changing colors in other applications when a cursor moves in
+ and out of the canvas. However, if the number of requested colors is smaller
+ than the maximum number of possible colors in the palette, then the first
+ colors in the default system palette will be preserved, minimizing this
+ problem.
+ When CD_POLITE is used, all colors allocated by the driver are liberated, and
+ the requested colors are allocated. This is useful for the application to
+ prioritize the colors that will be allocated, causing other colors to be
+ mapped to their closest colors.
+ Note that canvases in the same application interfere with one another, but
+ when a canvas is terminated it liberates all allocated colors.
+
+
Exclusive Attributes
+
+
"GC": returns the GDK graphics
+ context (get only). In Lua is returned as a user data.
+
+
+
+
"ROTATE": allows the usage of 1
+ angle and 1 coordinate (x, y), that define a global rotation transformation
+ centered in the specified coordinate. Use 1 real and 2 integer values inside a
+ string ("%g %d %d" = angle x y). In this driver will change the
+ current transformation matrix, if removed will reset the current
+ transformation matrix.
+
+
+
+
"ANTIALIAS": controls the use of
+ anti-aliasing for the text, image zoom and line drawing primitives. Assumes
+ values "1" (active) and "0" (inactive). Default value: "1".
+
+
+
+
"CAIROVERSION": returns a string with
+ the Cairo version number. It is empty if the Cairo is not available.
CD_SVG - CD Scalable Vector Graphics Driver (cdsvg.h)
+
+
This driver allows the generation of a SVG file, a modularized language for
+ describing two-dimensional vector and mixed vector/raster graphics in XML. The
+ SVG specification is an open standard
+ that has been under development by the World Wide
+ Web Consortium (W3C) since 1999.
+
+
Use
+
+
The file is created by calling function
+ cdCreateCanvas(CD_SVG,
+ Data). The Data parameter is a string that must contain the filename and the canvas
+ dimensions, in the following format:
+
+
"filename [widthxheight resolution]" or in C "%s %gx%g %g"
+
+
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. 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.
CD is a platform-independent graphics library. It is implemented in several
- platforms using native graphics libraries: Microsoft Windows (GDI and GDI+)
+
CD is a platform-independent graphics library. Its drivers are implemented in several
+ platforms, some use portable code, others use native graphics libraries, such
+ as Microsoft Windows (GDI and GDI+)
and X-Windows (XLIB).
The library contains functions to support both vector and image
applications, and the visualization surface can be either a canvas or a more
abstract surface, such as Clipboard, Metafile, PS, and so on.
-
To make the Application Programmers Interface (API) simple, all data are
- standard C types (int, double or char). Thus the application program does not
- have to maintain parallel data structures to deal with the graphic library.
-
Furthermore, the list of parameters of the CD primitive functions contains
only the geometrical descriptions of the objects (line, circle, text, etc.).
Where these objects should appear and what is the their color, thickness, etc.
@@ -110,7 +107,8 @@ http://canvasdraw.cvs.sourceforge.net/canvasdraw/.
Mesa
libraries, for making the source code available, which helped us improve our
implementation of the Simulation driver and of the X-Windows driver. Thanks to
- Alan Richardson for the XVertex rotines. Thanks to
+ Alan Richardson for the XVertex rotines. Thanks to Lode Vandevenne for the
+ LodePNG rotines used in the SVG driver. Thanks to
Jason Perkins for the Premake
tool.
The CD distribution includes the FreeType library, this is a third party
diff --git a/html/en/to_do.html b/html/en/to_do.html
index 2fc0e11..7fbceaf 100644
--- a/html/en/to_do.html
+++ b/html/en/to_do.html
@@ -19,7 +19,6 @@