From 17be65cfea56a53dc3a9cb617895adf5300db099 Mon Sep 17 00:00:00 2001 From: scuri Date: Tue, 1 Jun 2010 22:31:45 +0000 Subject: *** empty log message *** --- html/en/func/filled.html | 24 ++++++++++++++---------- html/en/func/lines.html | 22 +++++++++++++--------- html/en/func/polygon.html | 31 ++++++++++++++++++++----------- 3 files changed, 47 insertions(+), 30 deletions(-) (limited to 'html') diff --git a/html/en/func/filled.html b/html/en/func/filled.html index 2ae1083..97a2e84 100644 --- a/html/en/func/filled.html +++ b/html/en/func/filled.html @@ -63,25 +63,29 @@ canvas:fSector(xc, yc, w, h, angle1, angle2: number) [in Lua] canvas:wSector(xc, yc, w, h, angle1, angle2: number) (WC) [in Lua]

Fills the arc of an ellipse aligned with the axis, according to the current - interior style, in the shape of a pie. It is drawn counter-clockwise. The + interior style, in the shape of a pie.

+

The coordinate (xc,yc) defines the center of the ellipse. Dimensions w and h define the elliptic axes X and Y, respectively.

-

Angles angle1 and angle2, in degrees, - define the arc's beginning and end, but they are not the angle relative to the +

Angles angle1 and angle2 are in degrees and oriented + counter-clockwise. They + define the arc start and end, but they are not the angle relative to the center, except when w==h and the ellipse is reduced to a circle. The arc - starts at the point (xc+(w/2)*cos(angle1),yc+(h/2)*sin(angle1)) - and ends at (xc+(w/2)*cos(angle2),yc+(h/2)*sin(angle2)). A - complete ellipse can be drawn using 0 and 360 as the angles.

+ starts at the point (xc+(w/2)*cos(angle1), yc+(h/2)*sin(angle1)) + and ends at (xc+(w/2)*cos(angle2), yc+(h/2)*sin(angle2)). A + complete ellipse can be drawn using 0 and 360 as the angles.  If angle2 + is less than angle1 it will be increased by 360 until it is greater + than angle1.

The angles are specified so if the size of the ellipse (w x h) is changed, its shape is preserved. So the angles relative to the center are dependent - from the ellipse size. The actual angle can be obtained using rangle = - atan2((h/2)*sin(angle),(w/2)*cos(angle)).

-

The angles are given in degrees. To specify the angle in radians, you can + from the ellipse size. The actual angle can be obtained using rangle = + atan2((h/2)*sin(angle), (w/2)*cos(angle)).

+

To specify the angle in radians, you can use the definition CD_RAD2DEG to multiply the value in radians before passing the angle to CD.

When the interior style CD_HOLLOW is defined, - the function behaves like its equivalent cdArc, + the function behaves like its equivalent cdCanvasArc, plus two lines connecting to the center.

Sector Parameters

diff --git a/html/en/func/lines.html b/html/en/func/lines.html index b748391..6ba78d7 100644 --- a/html/en/func/lines.html +++ b/html/en/func/lines.html @@ -1,5 +1,5 @@ - + @@ -64,21 +64,25 @@ canvas:fArc(xc, yc, w, h, angle1, angle2: number) [in Lua] canvas:wArc(xc, yc, w, h, angle1, angle2: number) (WC) [in Lua]

Draws the arc of an ellipse aligned with the axis, using the current - foreground color and line width and style. It is drawn counter-clockwise. The + foreground color and line width and style.

+

The coordinate (xc,yc) defines the center of the ellipse. Dimensions w and h define the elliptic axes X and Y, respectively.

-

Angles angle1 and angle2, in degrees define - the arc's beginning and end, but they are not the angle relative to the +

Angles angle1 and angle2 are in degrees and oriented + counter-clockwise. They define + the arc start and end, but they are not the angle relative to the center, except when w==h and the ellipse is reduced to a circle. The arc - starts at the point (xc+(w/2)*cos(angle1),yc+(h/2)*sin(angle1)) - and ends at (xc+(w/2)*cos(angle2),yc+(h/2)*sin(angle2)). A - complete ellipse can be drawn using 0 and 360 as the angles.

+ starts at the point (xc+(w/2)*cos(angle1), yc+(h/2)*sin(angle1)) + and ends at (xc+(w/2)*cos(angle2), yc+(h/2)*sin(angle2)). A + complete ellipse can be drawn using 0 and 360 as the angles. If angle2 + is less than angle1 it will be increased by 360 until it is greater + than angle1.

The angles are specified so if the size of the ellipse (w x h) is changed, its shape is preserved. So the angles relative to the center are dependent from the ellipse size. The actual angle can be obtained using rangle = - atan2((h/2)*sin(angle),(w/2)*cos(angle)).

-

The angles are given in degrees. To specify the angle in radians, you can + atan2((h/2)*sin(angle), (w/2)*cos(angle)).

+

To specify the angle in radians, you can use the definition CD_RAD2DEG to multiply the value in radians before passing the angle to CD.

Arc Parameters
diff --git a/html/en/func/polygon.html b/html/en/func/polygon.html index 3a0b9c0..c2acb9a 100644 --- a/html/en/func/polygon.html +++ b/html/en/func/polygon.html @@ -93,42 +93,43 @@ canvas:PathSet(action: number) [in Lua]

Configures the action between sequences of cdCanvasVertex. action can be:

@@ -139,6 +140,14 @@ cdCanvasPathSet(canvas, CD_PATH_MOVETO); cdCanvasVertex(canvas, x1, y1); cdCanvasPathSet(canvas, CD_PATH_LINETO); cdCanvasVertex(canvas, x2, y2); +cdCanvasPathSet(canvas, CD_PATH_CURVETO); +cdCanvasVertex(canvas, x3, y3); /* control point for start point */ +cdCanvasVertex(canvas, x4, y4); /* control point for end point */ +cdCanvasVertex(canvas, x5, y5); /* end point */ +cdCanvasPathSet(canvas, CD_PATH_ARC); +cdCanvasVertex(canvas, x6, y6); /* center */ +cdCanvasVertex(canvas, x7, y7); /* width, height */ +cdCanvasVertex(canvas, x8, y8); /* start angle, end angle (degrees / 1000) */ cdCanvasPathSet(canvas, CD_PATH_STROKE); cdCanvasEnd(canvas); -- cgit v1.2.3