From 64a0b5ebb41d36a7db87d24c5451f7db925e24f8 Mon Sep 17 00:00:00 2001
From: scuri
Only available in Lua when require"cdluacairo" is +
These are not ContextPlus drivers. In Lua, they are available only when require"cdluacairo" is used.
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]
diff --git a/html/en/history.html b/html/en/history.html
index cdb7187..117262b 100644
--- a/html/en/history.html
+++ b/html/en/history.html
@@ -27,8 +27,10 @@
Control
Coordinate System
Extra
General Attributes
- +Primitives
Attributes
Attributes
Extras in Lua
Attributes
Properties
Attributes
Properties
Extras
Extras in Lua
Other
System
Metafile Interpretation
Color Coding
Window Systems
Devices
Images
File
Base Drivers
Context Plus