From d75fe4058da7aaf64e53b4210614a189cf67dfb5 Mon Sep 17 00:00:00 2001 From: scuri Date: Tue, 22 Jun 2010 15:10:12 +0000 Subject: *** empty log message *** --- html/en/func/attributes.html | 18 ++++++++------ html/en/func/filled.html | 59 +++++++++++++++++++++++++++----------------- html/en/home.html | 7 +++++- 3 files changed, 53 insertions(+), 31 deletions(-) (limited to 'html/en') diff --git a/html/en/func/attributes.html b/html/en/func/attributes.html index 984af01..cc87ee6 100644 --- a/html/en/func/attributes.html +++ b/html/en/func/attributes.html @@ -8,18 +8,21 @@

General Attributes

+
long int cdCanvasForeground(cdCanvas* canvas, long int color); [in C]
 void cdCanvasSetForeground(cdCanvas* canvas, long int color); [in C]
 
 canvas:Foreground(color: lightuserdata) -> (old_color: lightuserdata) [in Lua]
 canvas:SetForeground(color: lightuserdata) [in Lua]
-

Configures a new current foreground color and returns the previous one. This - color is used in all primitives (lines, areas, marks and text). Default value: +

Configures a new current foreground color and returns the previous one. + This color is used in all primitives (lines, areas, marks and text). Default + value: CD_BLACK. Value CD_QUERY simply returns the - current value.

+ current value.

Notice that CD_QUERY conflicts with color RGBA=(255,255,255,0) (full - transparent white). Use SetForeground to avoid the - conflict. See also Color Coding.

+ transparent white). Use SetForeground to avoid the + conflict. See also Color Coding.

+
long int cdCanvasBackground(cdCanvas* canvas, long int color); [in C]
 void cdCanvasSetBackground(cdCanvas* canvas, long int color); [in C]
 
@@ -33,7 +36,8 @@ canvas:SetBackground(color: lightuserdata) [in Lua]
Value CD_QUERY simply returns the current value.

Notice that CD_QUERY conflicts with color RGBA=(255,255,255,0) (full transparent white). Use SetBackground to avoid the - conflict. See also Color Coding.

+ conflict. See also Color Coding.

+
int cdCanvasWriteMode(cdCanvas* canvas, int mode); [in C]
 
 canvas:WriteMode(mode: number) -> (old_mode: number) [in Lua]
@@ -44,6 +48,6 @@ canvas:WriteMode(mode: number) -> (old_mode: number) [in Lua]

Note: operation XOR is very useful, because, using white as the foreground color and drawing the same image twice, you can go back to the original color, - before the drawing. This is commonly used for mouse selection feedback.

+ before the drawing. This is commonly used for mouse selection feedback.

diff --git a/html/en/func/filled.html b/html/en/func/filled.html index 97a2e84..036f015 100644 --- a/html/en/func/filled.html +++ b/html/en/func/filled.html @@ -35,11 +35,11 @@ PDF drivers the line at the edge is not included at all.

the clipping is only affected if it is active.


-
Filled Polygons
+

Filled Polygons

Filled polygons can be created using cdBegin(CD_FILL)/cdVertex(x,y)/.../cdEnd().

See the documentation of cdBegin/cdVertex/cdEnd.

- +
void cdCanvasBox(cdCanvas* canvas, int xmin, int xmax, int ymin, int ymax); [in C]
 void cdfCanvasBox(cdCanvas* canvas, double xmin, double xmax, double ymin, double ymax); [in C]
 void wdCanvasBox(cdCanvas* canvas, double xmin, double xmax, double ymin, double ymax); (WC) [in C]
@@ -53,8 +53,8 @@ canvas:wBox(xmin, xmax, ymin, ymax: number) (WC) [in Lua]
will be painted. When the interior style CD_HOLLOW is defined, the function behaves like its equivalent cdRect.

- -
void cdCanvasSector(cdCanvas* canvas, int xc, int yc, int w, int h, double angle1, double angle2); [in C]
+
+
void cdCanvasSector(cdCanvas* canvas, int xc, int yc, int w, int h, double angle1, double angle2); [in C]
 void cdfCanvasSector(cdCanvas* canvas, double xc, double yc, double w, double h, double angle1, double angle2); [in C]
 void wdCanvasSector(cdCanvas* canvas, double xc, double yc, double w, double h, double angle1, double angle2); (WC) [in C]
 
@@ -89,7 +89,8 @@ canvas:wSector(xc, yc, w, h, angle1, angle2: number) (WC) [in Lua]
plus two lines connecting to the center.

Sector Parameters

- +
+
void cdCanvasChord(cdCanvas* canvas, int xc, int yc, int w, int h, double angle1, double angle2); [in C]
 void cdfCanvasChord(cdCanvas* canvas, double xc, double yc, double w, double h, double angle1, double angle2); [in C]
 void wdCanvasChord(cdCanvas* canvas, double xc, double yc, double w, double h, double angle1, double angle2); (WC) [in C]
@@ -106,9 +107,9 @@ canvas:wChord(xc, yc, w, h, angle1, angle2: number) (WC) [in Lua]
plus a line connecting the arc start and end points.

Chord Parameters

- +

Attributes

-
int cdCanvasBackOpacity(cdCanvas* canvas, int opacity); [in C]
+
int cdCanvasBackOpacity(cdCanvas* canvas, int opacity); [in C]
 
 canvas:BackOpacity(opacity: number) -> (old_opacity: number) [in Lua]
@@ -121,8 +122,8 @@ canvas:BackOpacity(opacity: number) -> (old_opacity: number) [in Lua]
current value. In some drivers is always opaque.

Back Opacity Attribute

- -
int cdCanvasFillMode(cdCanvas* canvas, int mode); [in C]
+
+
int cdCanvasFillMode(cdCanvas* canvas, int mode); [in C]
 
 canvas:FillMode(mode: number) -> (old_mode: number) [in Lua]
@@ -132,7 +133,8 @@ canvas:FillMode(mode: number) -> (old_mode: number) [in Lua]

Fill Modes

-
int cdCanvasInteriorStyle(cdCanvas* canvas, int style); [in C]
+
+
int cdCanvasInteriorStyle(cdCanvas* canvas, int style); [in C]
 
 canvas:InteriorStyle(style: number) -> (old_style: number) [in Lua]
@@ -150,7 +152,8 @@ canvas:InteriorStyle(style: number) -> (old_style: number) [in Lua]
equivalent cdRect and cdArc+Lines, and the polygons with style CD_FILL behave like CD_CLOSED_LINES.

-
int cdCanvasHatch(cdCanvas* canvas, int style); [in C]
+
+
int cdCanvasHatch(cdCanvas* canvas, int style); [in C]
 
 canvas:Hatch(style: number) -> (old_style: number) [in Lua]
@@ -166,7 +169,8 @@ canvas:Hatch(style: number) -> (old_style: number) [in Lua]

Hatch Styles

-
void cdCanvasStipple(cdCanvas* canvas, int w, int h, const unsigned char *fgbg) [in C]
+
+
void cdCanvasStipple(cdCanvas* canvas, int w, int h, const unsigned char *fgbg) [in C]
 
 canvas:Stipple(stipple: cdStipple) [in Lua]
@@ -181,7 +185,8 @@ canvas:Stipple(stipple: cdStipple) [in Lua]
drivers is always opaque. The foreground and background colors must be set before setting the style.

-
void wdCanvasStipple(cdCanvas* canvas, int w, int h, const unsigned char *fgbg, double w_mm, double h_mm); [in C]
+
+
void wdCanvasStipple(cdCanvas* canvas, int w, int h, const unsigned char *fgbg, double w_mm, double h_mm); [in C]
 
 canvas:wStipple(stipple: cdStipple, w_mm, h_mm: number) [in Lua]
@@ -191,14 +196,16 @@ canvas:wStipple(stipple: cdStipple, w_mm, h_mm: number) [in Lua]
size that is closets to the size in millimeters. The use of this function may produce very large or very small stipples.

-
unsigned char* cdCanvasGetStipple(cdCanvas* canvas, int* w, int* h); [in C]
+
+
unsigned char* cdCanvasGetStipple(cdCanvas* canvas, int* w, int* h); [in C]
 
 canvas:GetStipple() - > (stipple: cdStipple) [in Lua]

Returns the current stipple and its dimensions. Returns NULL if no stipple was defined.

-
void cdCanvasPattern(cdCanvas* canvas, int w, int h, const long int *color); [in C]
+
+
void cdCanvasPattern(cdCanvas* canvas, int w, int h, const long int *color); [in C]
 
 canvas:Pattern(pattern: cdPattern) [in Lua]
@@ -209,7 +216,8 @@ canvas:Pattern(pattern: cdPattern) [in Lua]
does not need to be stored by the application, as it is internally replicated by the library.

-
void wdCanvasPattern(cdCanvas* canvas, int w, int h, const long int *color, double w_mm, double h_mm); [in C]
+
+
void wdCanvasPattern(cdCanvas* canvas, int w, int h, const long int *color, double w_mm, double h_mm); [in C]
 
 canvas:wPattern(pattern: cdPattern, w_mm, h_mm: number) [in Lua]
@@ -219,32 +227,37 @@ canvas:wPattern(pattern: cdPattern, w_mm, h_mm: number) [in Lua]
size that is closets to the size in millimeters. The use of this function may produce very large or very small patterns.

-
long int* cdCanvasGetPattern(cdCanvas* canvas, int* w, int* h); [in C]
+
+
long int* cdCanvasGetPattern(cdCanvas* canvas, int* w, int* h); [in C]
 
 canvas:GetPattern() - > (pattern: cdPattern) [in Lua]

Returns the current pattern and its dimensions. Returns NULL if no pattern was defined.

- +

Extras in Lua

-
cd.CreatePattern(width, height: number) -> (pattern: cdPattern)
+ +
cd.CreatePattern(width, height: number) -> (pattern: cdPattern)

Creates a pattern in Lua.

-
cd.KillPattern(pattern: cdPattern)
+
+
cd.KillPattern(pattern: cdPattern)

Destroys the created pattern and liberates allocated memory. If this function is not called in Lua, the garbage collector will call it.

-
cd.CreateStipple(width, height: number) -> (stipple: cdStipple)
+
+
cd.CreateStipple(width, height: number) -> (stipple: cdStipple)

Creates a stipple in Lua.

-
cd.KillStipple(stipple: cdStipple)
+
+
cd.KillStipple(stipple: cdStipple)

Destroys the created stipple and liberates allocated memory. If this function is not called in Lua, the garbage collector will call it.

- +

Data Access

Data access in Lua is done directly using the operator "[y*width diff --git a/html/en/home.html b/html/en/home.html index 07f79ab..8232b61 100644 --- a/html/en/home.html +++ b/html/en/home.html @@ -5,6 +5,11 @@ Home + @@ -20,7 +25,7 @@ either a window or a more abstract surface, such as Image, Clipboard, Metafile, PS, and so on.

This work was developed at Tecgraf/PUC-Rio by means of the partnership with PETROBRAS/CENPES.

-

Project Management:

+

Project Management:

Antonio Escaņo Scuri

-- cgit v1.2.3