From 64a0b5ebb41d36a7db87d24c5451f7db925e24f8 Mon Sep 17 00:00:00 2001 From: scuri Date: Fri, 18 Mar 2011 22:23:38 +0000 Subject: New: functions cdContextIsPlus and cdContextType. --- html/en/func/init.html | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'html/en/func') diff --git a/html/en/func/init.html b/html/en/func/init.html index 8b3bccb..a73deea 100644 --- a/html/en/func/init.html +++ b/html/en/func/init.html @@ -132,13 +132,13 @@ transparency.

In Lua, when using require"cdluacontextplus" this function will be automatically called.

-
cdContext* cdCanvasGetContext(cdCanvas *canvas); [in C]
+

cdContext* cdCanvasGetContext(cdCanvas *canvas); [in C]
 
 canvas:GetContext(canvas: cdCanvas) -> (ctx: number) [in Lua]

Returns the context of a given canvas, which can be compared with the predefined contexts, such as "CD_PS".

-
int cdContextCaps(cdContext* ctx); [in C]
+
int cdContextCaps(cdContext* ctx); [in C]
 
 cd.ContextCaps(ctx: number) -> (caps: number) [in Lua]
@@ -181,7 +181,26 @@ cd.ContextCaps(ctx: number) -> (caps: number) [in Lua] (Native Window and IUP).

-
int cdCanvasSimulate(cdCanvas* canvas, int mode); [in C]
+
int cdContextType(cdContext* ctx); [in C]
+
+cd.ContextType(ctx: number) -> (type: number) [in Lua]
+ +

Returns the type of the context:

+ +

CD_CTX_WINDOW - GUI window based
+CD_CTX_DEVICE - device based (clipboard, printer, picture)
+CD_CTX_IMAGE - server or client image based, including double buffer based
+ CD_CTX_FILE - metafile based

+ + +
int cdContextIsPlus(cdContext* ctx); [in C]
+
+cd.ContextIsPlus(ctx: number) -> (plus: boolean) [in Lua]
+ +

Returns if it is a context plus.

+ + +
int cdCanvasSimulate(cdCanvas* canvas, int mode); [in C]
 
 canvas:Simulate(mode: number) -> (old_mode: number) [in Lua]
-- cgit v1.2.3