From eef7ae01a9757f5e4a0693d539ee1fac5b09e756 Mon Sep 17 00:00:00 2001
From: scuri This driver represents a basic driver for all system-dependent drivers
implemented in the X-Windows and MS-Windows systems. The implementation uses the
- Cairo and Pango functions. This driver can be
+ Cairo and
+ Pango functions. This driver can be
compiled and used in all systems Cairo is supported. The drivers Native Window,
Image, EMF, Printer and Double Buffer were implemented. It can be used as the context plus driver of the GDI, GDK and X-Win based
+drivers. But its primary focus is the GDK base driver. The main motivation for the use of Cairo was transparency for all the
primitives. Beyond that we got other features like anti-aliasing, gradient
filling, transformations and other back-ends (support to rendering: PDF, PS, SVG and
IMAGERGB surfaces). This driver still does not completely replace the X-Windows and GDI Windows
+ This driver still does not completely replace the X-Windows, GDK and GDI Windows
base drivers, because Cairo does not have support for bitwise XOR operations and
for complex clipping regions. So we let the programmer to choose what to use. We created the function
- cdUseContextPlus that allows to activate or to deactivate the use of
- Cairo for the available GDK, Win32 or X-Windows based drivers.
+ cdUseContextPlus that allows to activate or to deactivate the use of
+ Cairo for the available GDK, Win32 or X-Win based drivers.
This function affects only the cdCreateCanvas function call, once created
the canvas will be always a Cairo canvas. In fact the function affects primary the definitions
CD_NATIVEWINDOW,
@@ -50,13 +53,17 @@ for complex clipping regions. Using Cairo it is allowed to create more that one canvas at the same time for the same Window. And they can co-exist
with a standard GDK, Win32 or X-Windows canvas. To enable the use of Cairo based drivers you must call the initialization function
- cdInitContextPlus() once and link to the libraries "cdcairo" and "cairo". Also the Cairo library must be installed in your system.
- When using the GDK base driver you do not need to link with the "cdcairo"
- library. In CDLua it is not necessary any additional initialization, and require"cdluacairo" can be used when
- using dynamic libraries. But when using require there are some restrictions,
- in Win32 the GDK base driver can NOT be used, in Linux the X11 base driver
- can NOT be used, and in other UNICES the GDK base driver can NOT be used.
Also the Cairo library must be installed in your system.
+In CDLua it is not necessary any additional initialization, and require"cdluacontextplus" can be used when + using dynamic libraries. But it is available only in Linux and only for the + GDK base driver.
+As an alternative you can use require"cdluacairo", +but there are some restrictions: + in Windows only the GDI base driver can be used; in Linux only the X-Win base driver + can be used.
Only available in Lua when require"cdluacairo" is diff --git a/html/en/drv/clipbd.html b/html/en/drv/clipbd.html index 888198c..a5f068e 100644 --- a/html/en/drv/clipbd.html +++ b/html/en/drv/clipbd.html @@ -51,18 +51,19 @@ Display where the metafile will be obtained. The cdRegisterCallback must be called for the driver that will interpret the file, except for bitmaps that the CD_CLIPBOARD driver must be used.
-To use this driver in Windows using GDI+ is necessary to call - - cdUseContextPlus(1) -before creating the canvas.
This driver is greatly platform-dependent. For further detail, see the - Behavior of Functions in each platform: Microsoft - Windows (GDI), X-Windows (XLIB). However, it - should be noted that some functions behave differently from the basic - functions of each platform.
+This driver is very platform-dependent.
+ +For further detail, see the + Behavior of Functions in each base driver: GDI, + GDK and X-Win. To use this driver + with a context plus base driver is necessary to call + + cdUseContextPlus(1) + before creating the canvas, see the GDI+, Cairo +and XRender base drivers.
diff --git a/html/en/drv/dbuf.html b/html/en/drv/dbuf.html index 0393d10..59dff49 100644 --- a/html/en/drv/dbuf.html +++ b/html/en/drv/dbuf.html @@ -45,18 +45,21 @@ cdCanvasActivate.We suggest you to implement rubber bands using XOR directly on the front buffer.
-To use this driver in Windows using GDI+ is necessary to call - - cdUseContextPlus(1) -before creating the canvas.
This driver is greatly platform-dependent. For further detail, see the - Behavior of Functions in each platform: Microsoft - Windows (GDI), Windows Using GDI+, - X-Windows (XLIB), GDK. However, it should be noted that - some functions behave differently from the basic functions of each platform.
+This driver is very platform-dependent.
+ +For further detail, see the + Behavior of Functions in each base driver: GDI, + GDK and X-Win. To use this driver + with a context plus base driver is necessary to call + + cdUseContextPlus(1) + before creating the canvas, see the GDI+, Cairo +and XRender base drivers.
+However, it should be noted that some functions behave differently from the +basic functions of each platform.
This driver allows generating a Microsoft Windows Enhanced Metafile, the format used by 32-bit Windows systems to store graphics primitives. Usually, the filename has an extension "*.emf".
-The driver works only in the Microsoft Windows platform, but you can use it +
The driver works only with the GDI, GDI+ and Cairo base drivers, but you can use it in other platforms without the risk of compilation error. If you attempt to create a canvas in another platform, function cdCreateCanvas will return NULL.
@@ -41,23 +41,31 @@ cdKillCanvas is required to close the file properly. -To use this driver in Windows using GDI+ is necessary to call
-
+
+ This driver is very platform-dependent. For further detail, see the
+ Behavior of Functions in each base driver: GDI. To use this driver
+ with a context plus base driver is necessary to call
+
cdUseContextPlus(1)
-before creating the canvas. If you intend to use cdCanvasPlay
+ before creating the canvas, see the GDI+ and
+ Cairo base drivers. However, it should be noted that some functions behave differently from the
+basic functions of each platform. It has
+ been noticed that EMFs, when saved in the Windows 9x environment, is not
+ totally compatible with EMFs saved in the Windows NT environment. If you intend to use cdCanvasPlay
to interpret the EMF, then do not use GDI+ to generate the metafile. GDI+
extensively use internal transformations that will affect the
cdCanvasPlay interpretation. Also some interior style will not be
correctly interpreted. This driver is greatly platform-dependent. For further detail, see the
- Behavior of Functions of the Microsoft Windows (GDI)
- or Windows Using GDI+ platform base drivers. It has
- been noticed that EMF, when saved in the Windows 95 environment, is not
- totally compatible with EMF saved in the Windows NT environment. This driver represents a base driver for all system-dependent drivers implemented in the Microsoft Windows system,
but uses a new API called GDI+. The drivers Clipboard, Native Window, IUP, Image, Printer,
EMF and Double Buffer were implemented. The driver WMF, and the function
cdPlay of the Clipboard and EMF drivers were not implemented using GDI+. It can be used only as the context plus driver of the GDI based drivers. The main motivation for the use of GDI+ was transparency for all the primitives. Beyond that we got other features
like anti-aliasing, gradient filling, bezier lines and filled cardinal splines. This driver still does not completely replace the GDI Windows base driver, because GDI+ does not have support for
XOR. Also the applications need to adapt the rendering of text that is slightly different from GDI. It is know that
GDI+ can be slower than GDI in some cases and faster in other cases, Microsoft does not make this clear. So we let the programmer to choose what to use. We created the function
- cdUseContextPlus that allows to activate or to deactivate the use of GDI+ for the available
- Windows based drivers.
+ cdUseContextPlus Behavior of Functions
+
+ Behavior of Functions
-
- Control Functions
that allows to activate or to deactivate the use of GDI+ for the
+ GDI based drivers.
This function affects only the cdCreateCanvas function call, once created
the canvas will be always a GDI+ canvas. In fact the function affects primary the definitions
CD_NATIVEWINDOW,
@@ -35,7 +36,7 @@
Microsoft Windows Base Driver Using GDI+
+GDI+ Base Driver
Using GDI+ it is allowed to create more that one canvas at the same time for the same Window. And they can co-exist with a standard GDI canvas.
To enable the use of GDI+ based drivers you must call the initialization function - cdInitContextPlus() once and link to the libraries "cdcontextplus.lib" and "gdiplus.lib". + cdInitContextPlus once and link to the libraries "cdcontextplus.lib" and "gdiplus.lib". Also the file "gdiplus.dll" must be available in your system. These files already came with Visual C++ 7 and Windows XP. For other compilers or systems you will need to copy the ".lib" file for you libraries area, and you will need to copy the DLL for the Windows\System (Win98/Me) or Windows\System32 (Win2000/NT4-SP6) folder. The diff --git a/html/en/drv/gl.html b/html/en/drv/gl.html index ffe3d65..8b78ca5 100644 --- a/html/en/drv/gl.html +++ b/html/en/drv/gl.html @@ -28,7 +28,7 @@ API functions, which it was written against the Free Type library.
The driver is not dependent of system functions. It uses only the OpenGL -portable funtions. So if the window canvas changes its size the attribute "SIZE" +portable functions. So if the window canvas changes its size the attribute "SIZE" must be set with the new size or cdCanvasGetSize will return an incorrect value.
In Lua, it is necessary to call function cdluagl_open() after a call - to function cdlua_open(), apart from linkediting with the "cdluagl" + to function cdlua_open(), apart from linking with the "cdluagl" library. This is not necessary if you do require"cdluagl".
For use with CDLUA, the Server Image passed as parameter must have been created with function cd.CreateImage in Lua.
-To use this driver in Windows using GDI+ is necessary to call - - cdUseContextPlus(1) -before creating the canvas.
This driver is greatly platform-dependent. For further detail, see the - Behavior of Functions in each platform: Microsoft - Windows (GDI), Windows Using GDI+, - X-Windows (XLIB), GDK. However, it should be noted that - some functions behave differently from the basic functions of each platform.
+This driver is very platform-dependent.
+ +For further detail, see the + Behavior of Functions in each base driver: GDI, + GDK and X-Win. To use this driver + with a context plus base driver is necessary to call + + cdUseContextPlus(1) + before creating the canvas, see the GDI+, Cairo +and XRender base drivers.
diff --git a/html/en/drv/iup.html b/html/en/drv/iup.html index b2644e0..2d7dda6 100644 --- a/html/en/drv/iup.html +++ b/html/en/drv/iup.html @@ -36,18 +36,22 @@ IUP distribution.In Lua, it is necessary to call function cdluaiup_open() after a call to function cdlua_open(), apart from linking with the "iupluacd" - library. To use with require must be require"iupluacd" or require"iupluacd51".
-To use this driver in Windows using GDI+ is necessary to call - - cdUseContextPlus(1) - before creating the canvas.
+ library. This is not necessary if you do require"iupluacd".This driver is greatly platform-dependent, but little dependent on the IUP library. For further detail, see the - Behavior of Functions in each platform: Microsoft Windows (GDI), - Windows Using GDI+, X-Windows (XLIB). However, it should be noted that some functions - behave differently from the basic functions of each platform.
+This driver is very platform-dependent, although little dependent on the IUP library.
+ +For further detail, see the + Behavior of Functions in each base driver: GDI, + GDK and X-Win. To use this driver + with a context plus base driver is necessary to call + + cdUseContextPlus(1) + before creating the canvas, see the GDI+, Cairo +and XRender base drivers.
+However, it should be noted that some functions behave differently from the +basic functions of each platform.
Microsoft Windows: can be the handle of the Windows window (HWND), +
GDI and GDI+: can be the handle of the Windows window (HWND),
or the handle of a previously created Device Context (HDC), or can be a string in the
format "hdc width height" or, in C, "%p %d %d".
To get the entire screen use a NULL data.
- X-Windows: It is a string in the format "display window" or, in C, "%p
- %lu" (uses the default screen).
The given parameters must exists until cdKillCanvas is called. The +
The given parameters must exists until cdKillCanvas is called. + In Windows, the HDC is released only if created inside cdCreateCanvas from an HWND or when data is NULL.
Any amount of such canvases may exist simultaneously, but they should not use the same window, except if you are using a GDI canvas and a GDI+ canvas at the same time for the same window.
-In CDLUA, the creation parameter must be a string in X-Windows and a userdata in Microsoft Windows.
-To use this driver in Windows using GDI+ is necessary to call - - cdUseContextPlus(1) -before creating the canvas.
+In CDLUA, the creation parameter must be a string in X-Windows and a userdata in + others.
This driver is greatly platform-dependent. For further detail, see the Behavior of Functions in each - platform: Microsoft Windows (GDI), Windows Using GDI+, - X-Windows (XLIB), GDK. However, it should be noted that some functions behave differently from the - basic functions of each platform.
+This driver is very platform-dependent.
+ +For further detail, see the + Behavior of Functions in each base driver: GDI, + GDK and X-Win. To use this driver + with a context plus base driver is necessary to call + + cdUseContextPlus(1) + before creating the canvas, see the GDI+, Cairo +and XRender base drivers.
+However, it should be noted that some functions behave differently from the +basic functions of each platform.
To use this driver, the application must be linked with the "cdpdf" and "pdflib" libraries.
In Lua, it is necessary to call function cdluapdf_open() after a call - to function cdlua_open(), apart from linkediting with the "cdluapdf" + to function cdlua_open(), apart from linking with the "cdluapdf" library. This is not necessary if you do require"cdluapdf".
Paper Size - The default paper size is A4. It is possible to change it by using one of the predefined sizes diff --git a/html/en/drv/printer.html b/html/en/drv/printer.html index f712821..49d8719 100644 --- a/html/en/drv/printer.html +++ b/html/en/drv/printer.html @@ -13,7 +13,7 @@
This driver provides access to a System Default Printer.
-Currently, it works only in Microsoft Windows platforms, but it is possible +
The driver works only with the GDI, GDI+ and Cairo base drivers, but it is possible
to use it in other platforms without the risk of compilation error. If you
attempt to create a canvas in another platform, the function
@@ -32,7 +32,7 @@
name is an optional document name that will
appear in the printer queue. Optionally, -d
- displays the System Printer dialogue box before starting to print, allowing
+ displays the system pre-defined printer dialog before starting to print, allowing
you to configure the printer's parameters. When using this parameter and the
return canvas is NULL, one must assume that the print was canceled by the
user.
To use this driver in Windows using GDI+ is necessary to call - - cdUseContextPlus(1) -before creating the canvas.
This driver is greatly platform-dependent. For further detail, see the - Behavior of Functions in each platform: Microsoft - Windows (GDI), Windows Using GDI+, - and Cairo (over GDK). However, it should be noted that - some functions behave differently from the basic functions of each platform.
-A printer created in Win32s has the same limitations as the - WMF driver. In Windows 95 or NT, it has the same +
This driver is very platform-dependent.
+ +For further detail, see the + Behavior of Functions in each base driver: GDI. To use this driver + with a context plus base driver is necessary to call + + cdUseContextPlus(1) + before creating the canvas, see the GDI+ and + Cairo base drivers.
+However, it should be noted that some functions behave differently from the +basic functions of each platform.
+A printer created in Windows has the same limitations as the EMF driver.
This driver represents a base driver for all system-dependent drivers implemented in the Microsoft Windows system. The implementation uses Win32 API graphics functions, the GDI. The driver works better in Windows NT, but it may also diff --git a/html/en/drv/xrender.html b/html/en/drv/xrender.html index 202ec34..11bdc1b 100644 --- a/html/en/drv/xrender.html +++ b/html/en/drv/xrender.html @@ -15,14 +15,15 @@
This driver represents a basic driver for all system-dependent drivers implemented in the X-Windows system using the XRender extension. The implementation uses the XRender and Xft API functions.
+It can be used only as the context plus driver of the X-Win based drivers.
The main motivation for the use of XRender was transparency for all the primitives. Beyond that we got other features like anti-aliasing, gradient filling and transformations.
This driver still does not completely replace the X-Windows base driver, because XRender does not have support for XOR and for line styles.
So we let the programmer to choose what to use. We created the function - cdUseContextPlus that allows to activate or to deactivate the use of - X-Render for the available X-Windows based drivers. + cdUseContextPlus
Using XRender it is allowed to create more that one canvas at the same time for the same Window. And they can co-exist with a standard X-Windows canvas.
To enable the use of XRender based drivers you must call the initialization function - cdInitContextPlus() once and link to the libraries "cdcontextplus", "Xrender" and "Xft". + cdInitContextPlus once and link to the libraries "cdcontextplus", "Xrender" and "Xft". Also the libraries "Xrender" and "Xft" must be installed in your system. The XRender extension must be available in the X-Windows server for the driver to work.
@@ -42,7 +43,7 @@ IRIX.In CDLua it is not necessary any additional initialization, but the application must still be linked with the cdcontextplus.lib library or a require"cdluacontextplus" can be used when - using dynamic libraries.
+ using dynamic libraries. When using require, it is NOT available in Linux.