diff options
Diffstat (limited to 'html/en')
-rw-r--r-- | html/en/drv/cairo.html | 42 | ||||
-rw-r--r-- | html/en/drv/gdiplus.html | 6 | ||||
-rw-r--r-- | html/en/drv/pdf.html | 5 | ||||
-rw-r--r-- | html/en/drv/ps.html | 5 | ||||
-rw-r--r-- | html/en/drv/svg.html | 3 | ||||
-rw-r--r-- | html/en/drv/win32.html | 3 | ||||
-rw-r--r-- | html/en/drv/xrender.html | 3 | ||||
-rw-r--r-- | html/en/func/color.html | 5 | ||||
-rw-r--r-- | html/en/func/init.html | 26 | ||||
-rw-r--r-- | html/en/func/marks.html | 3 | ||||
-rw-r--r-- | html/en/func/other.html | 2 | ||||
-rw-r--r-- | html/en/func/polygon.html | 30 | ||||
-rw-r--r-- | html/en/func/region.html | 2 | ||||
-rw-r--r-- | html/en/func/server.html | 3 | ||||
-rw-r--r-- | html/en/func/vectortext.html | 4 | ||||
-rw-r--r-- | html/en/func/wd.html | 2 | ||||
-rw-r--r-- | html/en/history.html | 9 | ||||
-rw-r--r-- | html/en/home.html | 2 |
18 files changed, 128 insertions, 27 deletions
diff --git a/html/en/drv/cairo.html b/html/en/drv/cairo.html index 4977258..c0ad80f 100644 --- a/html/en/drv/cairo.html +++ b/html/en/drv/cairo.html @@ -6,6 +6,11 @@ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>CAIRO</title> <link rel="stylesheet" type="text/css" href="../../style.css"> +<style type="text/css"> +.style1 { + font-family: Courier; +} +</style> </head> <body> @@ -15,8 +20,9 @@ <p>This driver represents a basic driver for all system-dependent drivers implemented in the X-Windows and MS-Windows systems. The implementation uses the <a href="http://library.gnome.org/devel/pango/">Cairo</a> API - functions and some GTK functions to support Unicode text. This driver can be - compiled and used in all systems Cairo is supported.</p> + functions and Pango functions to support Unicode text. This driver can be + compiled and used in all systems Cairo is supported. The drivers <b>Native Window</b>, + <b>Image</b>, <b>Printer</b> and <b>Double Buffer</b> were implemented.</p> <p>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 back-ends (support to rendering: PDF, PS, SVG and @@ -24,6 +30,25 @@ PNG surfaces).</p> <p>This driver still does not completely replace the X-Windows and GDI Windows base drivers, because Cairo does not have support for bitwise XOR operations and for complex clipping regions.</p> + <p>So we let the programmer to choose what to use. We created the function <font face="Courier"><strong> + cdUseContextPlus</strong></font> that allows to activate or to deactivate the use of + Cairo for the available GDK, Win32 or X-Windows based drivers. + This function affects only the <font face="Courier"><strong>cdCreateCanvas</strong></font> function call, once created + the canvas will be always a Cairo canvas. In fact the function affects primary the definitions + <font face="Courier"><strong>CD_NATIVEWINDOW</strong></font>, + <strong><span style="font-family: Courier">CD_IMAGE</span></strong> and <strong> + <span style="font-family: Courier">CD_DBUFFER</span></strong>, because they are + function calls and not static defines.</p> + <p>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 GD, Win32 or X-Windows canvas.</p> + <p>To enable the use of Cairo based drivers you must call the initialization function <font face="Courier"><strong> + cdInitContextPlus()</strong></font> once and link to the libraries "<strong>cdcairo</strong>" and "<strong>cairo</strong>". + When using the GDK base driver you do not need to link with the "<strong>cdcairo</strong>" + library. Also the Cairo library must be installed in your system.</p> + <p>In CDLua it is not necessary any additional initialization, but the + application must still be linked with the <strong>cdcontextplus.lib</strong> + library or a <strong>require"cdluacontextplus"</strong> can be used when + using dynamic libraries.</p> <h3>Behavior of Functions</h3> <h4>Control </h4> @@ -39,6 +64,13 @@ for complex clipping regions.</p> <font face="Courier"><strong>UpdateYAxis</strong></font></a>: the orientation of axis Y is the opposite to its orientation in the CD library.</li> </ul> +<h4>Primitives</h4> +<ul> + <li><a href="../func/lines.html#cdBegin"> + <font face="Courier"><strong>Begin</strong></font></a>: <strong><tt>CD_PATH</tt></strong> + is supported.</li> + <li>Floating point primitives are supported.</li> +</ul> <h4>Attributes </h4> <ul> <li> @@ -104,6 +136,12 @@ for complex clipping regions.</p> </ul> <ul> + <li>"<span class="style1"><strong>PATTERNIMAGE</strong></span>": defines + a filled interior style using a server image as pattern. Data must be a server + image handle created with he Cairo base driver.</li> +</ul> + +<ul> <li>"<b><font face="Courier">POLYHOLE</font></b>": defines the index of the vertex where there is a hole in a closed polygon. It will affect the next <strong>cdEnd</strong>. Can be called several times between <strong>cdBegin</strong> diff --git a/html/en/drv/gdiplus.html b/html/en/drv/gdiplus.html index f5b89f4..41e72dd 100644 --- a/html/en/drv/gdiplus.html +++ b/html/en/drv/gdiplus.html @@ -61,7 +61,8 @@ </ul> <h4>Primitives</h4> <ul> - <li><font face="Courier"><strong><a href="../func/marks.html#cdPixel">Pixel</a></strong></font>: + <li>Floating point primitives are supported.</li> + <li><font face="Courier"><strong><a href="../func/marks.html#cdPixel">Pixel</a></strong></font>: uses GDI. Excepting when the canvas is an image so it is done using GDI+.</li> <li><font face="Courier"><a href="../func/filled.html#cdSector"><b>Sector</b></a></font>: it also draws an arc in the same position to complete the size of the sector.</li> @@ -77,7 +78,8 @@ <strong><tt>CD_FILLGRADIENT</tt></strong> defines the points of a filled polygon. It is filled with a gradient from colors in each vertex to a color in its center. The colors are defined by the "<strong><tt>GRADIENTCOLOR</tt></strong>" attribute, that must be set before each <strong><tt>cdVertex</tt></strong> call and before <strong><tt>cdEnd</tt></strong> - for the center color. This will not affect the current interior style.</li> + for the center color. This will not affect the current interior style.<br> + <strong><tt>CD_PATH</tt></strong> is supported. </li> </ul> <h4>Attributes </h4> <ul> diff --git a/html/en/drv/pdf.html b/html/en/drv/pdf.html index 979256b..2d9203d 100644 --- a/html/en/drv/pdf.html +++ b/html/en/drv/pdf.html @@ -166,7 +166,10 @@ ZapfDingbats</pre> <li><font face="Courier"><strong><a href="../func/marks.html#cdPixel">Pixel</a></strong></font>: does not exist in PDF, is simulated using a circle with radius=1.</li> <li>Floating point primitives are supported.</li> - <li>Filled primitves do not include the line at the edges of the filled area.</li> + <li>Filled primitives do not include the line at the edges of the filled area.</li> + <li><a href="../func/lines.html#cdBegin"> + <font face="Courier"><strong>Begin</strong></font></a>: <strong><tt>CD_PATH</tt></strong> + is supported.</li> </ul> <h4>Server Images</h4> <ul> diff --git a/html/en/drv/ps.html b/html/en/drv/ps.html index 7e8f0c2..9f4267a 100644 --- a/html/en/drv/ps.html +++ b/html/en/drv/ps.html @@ -179,7 +179,10 @@ <li><font face="Courier"><strong><a href="../func/marks.html#cdPixel">Pixel</a></strong></font>: does not exist in PS, is simulated using a circle with radius=1.</li> <li>Floating point primitives are supported.</li> - <li>Filled primitves do not include the line at the edges of the filled area.</li> + <li>Filled primitives do not include the line at the edges of the filled area.</li> + <li><a href="../func/lines.html#cdBegin"> + <font face="Courier"><strong>Begin</strong></font></a>: <strong><tt>CD_PATH</tt></strong> + is supported.</li> </ul> <h4>Server Images</h4> <ul> diff --git a/html/en/drv/svg.html b/html/en/drv/svg.html index 10a0952..af703a5 100644 --- a/html/en/drv/svg.html +++ b/html/en/drv/svg.html @@ -76,6 +76,9 @@ <a href="http://www.tecgraf.puc-rio.br/cd/en/func/marks.html#cdPixel">Pixel</a></strong></font>: does not exist in SVG, is simulated using a circle with radius=0.1.</li> <li>Floating point primitives are supported.</li> + <li><a href="../func/lines.html#cdBegin"> + <font face="Courier"><strong>Begin</strong></font></a>: <strong><tt>CD_PATH</tt></strong> + is supported.</li> </dir> <h4>Client Images</h4> <dir> diff --git a/html/en/drv/win32.html b/html/en/drv/win32.html index df0d902..86a3f4e 100644 --- a/html/en/drv/win32.html +++ b/html/en/drv/win32.html @@ -37,6 +37,9 @@ using bitmaps.</li> <li><font face="Courier"><strong><a href="../func/lines.html#cdLine">Line</a></strong></font>: needs to draw an extra pixel in the final position.</li> + <li><a href="../func/lines.html#cdBegin"> + <font face="Courier"><strong>Begin</strong></font></a>: <strong><tt>CD_PATH</tt></strong> + is supported.</li> </ul> <h4>Attributes </h4> <ul> diff --git a/html/en/drv/xrender.html b/html/en/drv/xrender.html index 381470f..be85b8e 100644 --- a/html/en/drv/xrender.html +++ b/html/en/drv/xrender.html @@ -69,7 +69,8 @@ IRIX.</p> contain text regions.</li> <li><a href="../func/lines.html#cdBegin"> <font face="Courier"><strong>Begin</strong></font></a>: <strong><tt> - CD_BEZIER</tt></strong> is simulated with lines.</li> + CD_BEZIER</tt></strong> is simulated with lines. + <strong><tt>CD_PATH</tt></strong> is supported.</li> <li><font face="Courier"><strong><a href="../func/lines.html#cdRect">Rect</a></strong></font>: simulated using the client's <strong>Line</strong>.</li> <li><font face="Courier"><a href="../func/lines.html#cdArc"><b>Arc</b></a></font>: diff --git a/html/en/func/color.html b/html/en/func/color.html index 8efd8a4..fbd4b52 100644 --- a/html/en/func/color.html +++ b/html/en/func/color.html @@ -52,8 +52,9 @@ cd.DecodeColor(color: lightuserdata) -> (r, g, b: number) [in Lua]</pre> cd.EncodeAlpha(color: lightuserdata, alpha: number) -> (color: lightuserdata) [in Lua]</pre> <p>Returns the given color coded with the alpha information. ATENTION: At the - moment only the <a href="../drv/gdiplus.html">Win32 with GDI+</a>, the - <a href="../drv/xrender.html">XRender</a> and the <a href="../drv/irgb.html">IMAGERGB</a> + moment only the <a href="../drv/cairo.html">Cairo</a>, + <a href="../drv/gdiplus.html">GDI+</a>, <a href="../drv/xrender.html">XRender</a> + and <a href="../drv/irgb.html">IMAGERGB</a> drivers support alpha components in color coding. The internal representation of the component is inverted, because the default value must be 0 and opaque for backward compatibility, so you should use the <strong>cdDecodeAlpha</strong> diff --git a/html/en/func/init.html b/html/en/func/init.html index 9cdee9e..32a1ab6 100644 --- a/html/en/func/init.html +++ b/html/en/func/init.html @@ -41,7 +41,9 @@ cd.CreateCanvas(ctx: number, data: string or userdata) -> (canvas: cdCanvas) <ul> <li><a href="../drv/clipbd.html"><b>CD_CLIPBOARD</b></a> = Clipboard (<b>cdclipbd.h</b>).</li> - <li><a href="../drv/printer.html"><b>CD_PRINTER</b></a> = Printer (<b>cdprint.h</b>).</li> + <li><a href="../drv/printer.html"><b>CD_PRINTER</b></a> = Printer (<b>cdprint.h</b>).<br> + <a href="../drv/picture.html"><strong>CD_PICTURE</strong></a> = Picture in + memory (<strong>cdpicture.h</strong>).</li> </ul> <p><b>Image-Based Drivers</b> </p> <ul> @@ -51,22 +53,28 @@ cd.CreateCanvas(ctx: number, data: string or userdata) -> (canvas: cdCanvas) Drawing (<b>cdirgb.h</b>).</li> <li><a href="../drv/dbuf.html"><b>CD_DBUFFER</b></a> = Offscreen Drawing (<b>cddbuf.h</b>).</li> + <li><b><a href="../drv/dbufrgb.html">CD_DBUFFERRGB</a></b> = Client Offscreen Drawing + (<b>cddbuf.h</b>).</li> </ul> <p><b>File-Based Drivers</b> </p> <ul> - <li><a href="../drv/cgm.html"><b>CD_CGM</b></a> = Computer Graphics + <li><a href="../drv/pdf.html"><b>CD_PDF</b></a> = Adobe Portable Document Format (<b>cdpdf.h</b>).</li> + <li><a href="../drv/ps.html"><b>CD_PS</b></a> = PostScript File (<b>cdps.h</b>).</li> + <li><a href="../drv/svg.html"><b>CD_SVG</b></a> = Scalable Vector Graphics (<b>cdsvg.h</b>).</li> + <li><a href="../drv/mf.html"><b>CD_METAFILE</b></a> = Internal CD Metafile (<b>cdmf.h</b>).</li> + <li><a href="../drv/debug.html"><b>CD_DEBUG</b></a> = Internal CD Debug Log (<b>cddebug.h</b>).<br> + </li> + <li><a href="../drv/cgm.html"><b>CD_CGM</b></a> = Computer Graphics Metafile ISO (<b>cdcgm.h</b>).</li> <li><a href="../drv/dgn.html"><b>CD_DGN</b></a> = MicroStation Design File (<b>cddgn.h</b>).</li> <li><a href="../drv/dxf.html"><b>CD_DXF</b></a> = AutoCad Drawing - Interchange File (<b>cddxf.h</b>).</li> + Interchange File (<b>cddxf.h</b>).<br> + </li> <li><a href="../drv/emf.html"><b>CD_EMF</b></a> = Microsoft Windows Enhanced Metafile (<b>cdemf.h</b>). Works only in MS Windows systems.</li> - <li><a href="../drv/mf.html"><b>CD_METAFILE</b></a> = Metafile Canvas - Draw (<b>cdmf.h</b>).</li> - <li><a href="../drv/ps.html"><b>CD_PS</b></a> = PostScript File (<b>cdps.h</b>).</li> <li><a href="../drv/wmf.html"><b>CD_WMF</b></a> = Microsoft Windows - Metafile (<b>cdwmf.h</b>).</li> + Metafile (<b>cdwmf.h</b>). Works only in MS Windows systems.</li> </ul> <pre class="function"><span class="mainFunction">cdCanvas* <a name="cdCreateCanvasf">cdCreateCanvasf(cdContext *ctx, const char* format, ...)</a>; [in C] @@ -115,8 +123,8 @@ cd.UseContextPlus(use: boolean) -> (old_use: boolean) [in Lua]</pre> cd.InitContextPlus() [in Lua]</pre> <p>Initializes the context driver to use another context replacing the standard drivers. This functions is only available when a library containing a "ContextPlus" -context driver is used. See the <a href="../drv/gdiplus.html">GDI+</a> base -driver and the <a href="../drv/xrender.html">XRender</a> base driver.</p> +context driver is used. See the <a href="../drv/cairo.html">Cairo</a>, <a href="../drv/gdiplus.html">GDI+</a> +and <a href="../drv/xrender.html">XRender</a> base drivers.</p> <p>In Lua, when using require"cdluacontextplus" this function will be automatically called.</p> diff --git a/html/en/func/marks.html b/html/en/func/marks.html index b68db35..e467c10 100644 --- a/html/en/func/marks.html +++ b/html/en/func/marks.html @@ -25,7 +25,8 @@ canvas:Pixel(x, y: number, color: lightuserdata) [in Lua] canvas:wPixel(x, y: number, color: lightuserdata) (WC) [in Lua]</pre> <p>Configures the pixel <b>(x,y)</b> with the color defined by <b>color</b>. It is the smallest element of the canvas. It depends only - on global attributes of the canvas.</p> + on global attributes of the canvas. It can be very slow on some drivers. + Sometimes it is implemented as a rectangle with size 1x1.</p> <pre class="function"><span class="mainFunction">void <a name="cdMark">cdCanvasMark</a>(cdCanvas* canvas, int x, int y); [in C]</span> void wdCanvasMark(cdCanvas* canvas, double x, double y); (WC) [in C] diff --git a/html/en/func/other.html b/html/en/func/other.html index b493ae5..d334508 100644 --- a/html/en/func/other.html +++ b/html/en/func/other.html @@ -48,7 +48,7 @@ cd._VERSION cd._VERSION_DATE cd._VERSION_NUMBER</pre> - <p>Usefull definitions. They have the same value returned by <b>cdVersion</b>* + <p>Useful definitions. They have the same value returned by <b>cdVersion</b>* functions, except that they do not include the build number.</p> <hr> diff --git a/html/en/func/polygon.html b/html/en/func/polygon.html index 4e18664..4ab5834 100644 --- a/html/en/func/polygon.html +++ b/html/en/func/polygon.html @@ -6,6 +6,11 @@ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Polygons</title> <link rel="stylesheet" type="text/css" href="../../style.css"> +<style type="text/css"> +.style1 { + font-family: Courier; +} +</style> </head> <body> @@ -82,6 +87,31 @@ canvas:End() [in Lua]</pre> <p>Ends the polygon's definition and draws it.</p> +<p> </p> +"<span class="style1"><strong>PATH</strong></span>": allows to create + a complex path using CD primitives and then fill, stroke or clip using the + new path. Must be used with the following parameters:<ul> + <li>"BEGIN" - creates a new empty path, must be the first call</li> + <li>cdCanvasPixel, cdCanvasLine, cdCanvasArc - add elements to the path + instead of drawing to the canvas</li> + <li>"FILL" - closes the path, and fills it with the current fill attributes, + then the path is discarded</li> + <li>"STROKE" - strokes the path with the current line attributes, then the + path is discarded</li> + <li>"CLOSESTROKE" - closes the path, and strokes it with the current line + attributes, then the path is discarded</li> + <li>"FILLSTROKE" - closes the path, and fills it with the current fill + attributes, strokes the path with the current line attributes, then the path + is discarded</li> + <li>"CLIP" - closes the path, and use it as a clipping area to be + intersected with the current clipping area, then the path is discarded</li> + <li>"NULL" - discards the path and ends the process without any output.</li> + <li>ARC - If there is a current point an additional straight line is drawn + from the current point to the starting point of the arc. The endpoint of the + arc becomes the new current point. </li> + </ul> + + </body> </html> diff --git a/html/en/func/region.html b/html/en/func/region.html index 1581180..59874b8 100644 --- a/html/en/func/region.html +++ b/html/en/func/region.html @@ -67,7 +67,7 @@ canvas:wOffsetRegion(dx, dy: number) (WC) [in Lua]</pre> <p>Moves the current region by the given offset. In X-Windows, if the region moves to outside the canvas border, the part moved outside will be lost, the - region will need to be reconstruted.</p> + region will need to be reconstructed.</p> <pre class="function"><span class="mainFunction">void cdCanvasGetRegionBox(cdCanvas* canvas, int *xmin, int *xmax, int *ymin, int *ymax); [in C]</span> void wdCanvasGetRegionBox(cdCanvas* canvas, double *xmin, double *xmax, double *ymin, double *ymax); (WC) [in C] diff --git a/html/en/func/server.html b/html/en/func/server.html index 6663de5..2a9142e 100644 --- a/html/en/func/server.html +++ b/html/en/func/server.html @@ -21,7 +21,8 @@ <p>It is called "server" images because the data is stored in a system private format, that the application (or the client) does not have access.</p> <p>To create a server image there must be an active canvas of a driver with - server image support.</p> + server image support. Only the base drivers Win32, GDI+, X-Windows, XRender + and Cairo, support server images.</p> <hr> <pre class="function"><span class="mainFunction">cdImage* <a name="cdCreateImage">cdCanvasCreateImage</a>(cdCanvas* canvas, int w, int h); [in C]</span> diff --git a/html/en/func/vectortext.html b/html/en/func/vectortext.html index 84ca128..ec66aa2 100644 --- a/html/en/func/vectortext.html +++ b/html/en/func/vectortext.html @@ -14,8 +14,8 @@ left to right.</p> <p align="center"><font size="4">Vector Text Parameters</font><br> <img src="../../img/vector_text.gif" align="middle" border="2" width="101" height="91"></p> - <p>All vector text drawing in all drivers are simulated using other CD - primitives.</p> + <p>All vector text drawing in all drivers are simulated with other CD + primitives using polygons only.</p> <hr> <pre class="function"><span class="mainFunction">void <a name="cdVectorText">cdCanvasVectorText</a>(cdCanvas* canvas, int x, int y, const char* text); [in C]</span> void wdCanvasVectorText(cdCanvas* canvas, double x, double y, const char* text); (WC) [in C] diff --git a/html/en/func/wd.html b/html/en/func/wd.html index 938d19d..02fda2e 100644 --- a/html/en/func/wd.html +++ b/html/en/func/wd.html @@ -24,7 +24,7 @@ if the canvas has a small size the picture quality will be poor. To increase picture quality create a canvas with a larger size, if possible.</p> <p>All World Coordinate drawing in all drivers are simulated using other CD - primitives.</p> + primitives and do NOT depend or use the Transformation matrix.</p> <hr> <pre class="function"><span class="mainFunction">void <a name="wdWindow">wdCanvasWindow</a>(cdCanvas* canvas, double xmin, double xmax, double ymin, double ymax); [in C]</span> diff --git a/html/en/history.html b/html/en/history.html index 3029b31..7325ce8 100644 --- a/html/en/history.html +++ b/html/en/history.html @@ -19,13 +19,19 @@ <body> <h2>History of Changes</h2> -<h3>CVS (12/May/2010)</h3> +<h3><a href="http://sourceforge.net/projects/canvasdraw/files/5.4/">Version 5.4</a> (XX/XX/2010)</h3> <ul> <li><span style="color: #0000FF">New:</span> context plus driver Cairo.</li> <li><span style="color: #0000FF">New:</span> "CMD", "OPACITY" and "HATCHBOXSIZE" attributes in the SVG driver.</li> + <li><span style="color: #0000FF">New:</span> CD_PATH <strong>cdCanvasBegin</strong> + mode in the SVG, PS, PDF, Cairo, Win32 and GDI+ drivers.</li> <li><span class="style1">Changed</span><span class="hist_changed">:</span> CD_DXF now supports solid filled primitives for polygons and rectangles.</li> + <li><span class="style1">Changed</span><span class="hist_changed">:</span> + GDI+ base driver now supports floating point primitives. ATTENTION: check + for alignment and size problems in the application. Please report if + anything changed.</li> <li><span style="color: #FF0000">Fixed:</span> PDF driver documentation, <strong>CanvasBackOpacity</strong> and <strong>CanvasBackground</strong> are supported.</li> @@ -37,6 +43,7 @@ CanvasArc</strong> and Bezier polygon in the IMAGERGB driver.</li> <li><span style="color: #FF0000">Fixed:</span> missed implementation for CD_DEBUG, CD_PICTURE and CD_DBUFFERRGB in Lua.</li> + <li><span style="color: #FF0000">Fixed:</span> Chord in PDF driver.</li> </ul> <h3><a href="http://sourceforge.net/projects/canvasdraw/files/5.3/">Version 5.3</a> (26/Jan/2010)</h3> <ul> diff --git a/html/en/home.html b/html/en/home.html index e5c2968..07f79ab 100644 --- a/html/en/home.html +++ b/html/en/home.html @@ -11,7 +11,7 @@ <div class="homeTitle">CD</div> <div class="homeDescription">Canvas Draw, A 2D Graphics Library</div> -<div class="homeVersion">Version 5.3</div> +<div class="homeVersion">Version 5.4</div> <hr> <p><strong>CD</strong> (Canvas Draw) is a platform-independent graphics library. It is implemented in several |