From 0610dd4f3064220a2e8fb1d8dc120044eb6c64a8 Mon Sep 17 00:00:00 2001 From: scuri Date: Tue, 23 Jun 2009 03:18:33 +0000 Subject: *** empty log message *** --- html/en/func/text.html | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) (limited to 'html/en/func/text.html') diff --git a/html/en/func/text.html b/html/en/func/text.html index 6243325..f3399dc 100644 --- a/html/en/func/text.html +++ b/html/en/func/text.html @@ -37,8 +37,8 @@ canvas:Text(x, y: number, text: string) [in Lua] canvas:fText(x, y: number, text: string) [in Lua] canvas:wText(x, y: number, text: string) (WC) [in Lua] -

Inserts a text in (x,y) according to the current font and - text alignment. It expects an ANSI string with no line breaks.

+

Draws a text in the position (x,y) according to the current font and + text alignment. It expects an ANSI string. Can have line breaks.

Attributes

void cdCanvasFont(cdCanvas* canvas, const char* typeface, int style, int size); [in C]
@@ -164,9 +164,21 @@ void wdCanvasGetTextSize(cdCanvas* canvas, const char* text, double *width, doub
 canvas:GetTextSize(text: string) -> (width, heigth: number) [in Lua]
 canvas:wGetTextSize(text: string) -> (width, heigth: number) (WC) [in Lua]
-

Returns the width and height of a text's minimum box with the currently selected font. If the driver does not - support this kind of query, the values will be given 0 (zero). It is not necessary to provide all return pointers, you - can provide only the desired values and NULL for the others.

+

Returns the text size independent from orientation. It is + not necessary to provide all return pointers, you can provide only the desired + values and NULL for the others.

+ +
void cdCanvasGetTextBounds(cdCanvas* canvas, int x, int y, const char *text, int *rect); [in C]
+void wdCanvasGetTextBounds(cdCanvas* canvas, double x, double y, const char* text, double *rect); (WC) [in C]
+
+canvas:GetTextBounds(x, y: number, text: string) -> (rect0, rect1, rect2, rect3, rect4, rect5, rect6, rect7: number) [in Lua]
+canvas:wGetTextBounds(x, y: number, text: string) -> (rect0, rect1, rect2, rect3, rect4, rect5, rect6, rect7: number) (WC) [in Lua]
+ +

Returns the oriented bounding rectangle occupied by a text at a given + position. The rectangle has the same dimentions returned by + GetTextSize. The rectangle corners are returned in counter-clock wise + order starting with the bottom left corner, arranged (x0,y0,x1,y1,x2,y2,x3,y3).

+
void cdCanvasGetTextBox(cdCanvas* canvas, int x, int y, const char* text, int *xmin, int *xmax, int *ymin, int *ymax); [in C]
 void wdCanvasGetTextBox(cdCanvas* canvas, double x, double y, const char* text, double *xmin, double *xmax, double *ymin, double *ymax); (WC) [in C]
@@ -174,18 +186,11 @@ void wdCanvasGetTextBox(cdCanvas* canvas, double x, double y, const char* text,
 canvas:GetTextBox(x, y: number, text: string) -> (xmin, xmax, ymin, ymax: number) [in Lua]
 canvas:wGetTextBox(x, y: number, text: string) -> (xmin, xmax, ymin, ymax: number) (WC) [in Lua]
-

Returns the horizontal bounding rectangle of a text box, even if the text has an orientation. It is not necessary +

Returns the horizontal bounding rectangle occupied by a text at a given + position. If orientation is not 0 then its area is always larger than the + area of the rectangle returned by GetTextBounds. It is not necessary to provide all return pointers, you can provide only the desired values and NULL for the others.

-
void cdCanvasGetTextBounds(cdCanvas* canvas, int x, int y, const char *text, int *rect); [in C]
-void wdCanvasGetTextBounds(cdCanvas* canvas, double x, double y, const char* text, double *rect); (WC) [in C]
-
-canvas:GetTextBounds(x, y: number, text: string) -> (rect0, rect1, rect2, rect3, rect4, rect5, rect6, rect7: number) [in Lua]
-canvas:wGetTextBounds(x, y: number, text: string) -> (rect0, rect1, rect2, rect3, rect4, rect5, rect6, rect7: number) (WC) [in Lua]
- -

Returns the oriented bounding rectangle of a text box. The rectangle corners are returned in counter-clock wise - order starting with the bottom left corner, (x,y) arranged (x0,y0,x1,y1,x2,y2,x3,y3).

- -- cgit v1.2.3