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/filled.html | 59 +++++++++++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 23 deletions(-) (limited to 'html/en/func/filled.html') 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 -- cgit v1.2.3