From d8f5733cca135168f0c197d24258253a3e6b6d08 Mon Sep 17 00:00:00 2001
From: scuri Converts canvas coordinates into world coordinates. It is not necessary to
provide all return pointers, you can provide only the desired values and NULL
for the others. Configures the world coordinate system transformation to be used to
+ convert world coordinates (with values in real numbers) into canvas
+ coordinates (with values in integers). The transformation is automatically
+ set by wdCanvasWindow and wdCanvasViewport. Queries the current transformation being used to
+ convert world coordinates into canvas coordinates (and the other way round). It
+ is not necessary to provide all return pointers, you can provide only the
+ desired values. Translates the transformation by a delta, by adding the given values to
+ the current tx and ty values. Scales the transformation by a delta, by multiplying the given values by
+ the current sx and sy values.void wdCanvasSetTransform(cdCanvas* canvas, double sx, double sy, double tx, double ty); [in C]
+
+canvas:wSetTransform(sx, sy, tx, ty: number) [in Lua]
+ void wdCanvasGetTransform(cdCanvas* canvas, double *sx, double *sy, double *tx, double *ty); [in C]
+
+canvas:wGetTransform() -> (sx, sy, tx, ty: number) [in Lua]
+ void wdCanvasTranslate(cdCanvas* canvas, double dtx, double dty); [in C]
+
+canvas:wTranslate(dtx, dty: number) [in Lua]
+ void wdCanvasScale(cdCanvas* canvas, double dsx, double dsy); [in C]
+
+canvas:wScale(dsx, dsy: number) [in Lua]
+ Extra
void wdCanvasHardcopy(cdCanvas *canvas, cdContext* ctx, void *data, void(*draw_func)(cdCanvas *canvas_copy)); [in C]
@@ -77,5 +105,6 @@ canvas:wCanvasHardcopy(ctx: number, data: string or userdata, draw_func: functio
must use routines in WC) and, finally, removes the new canvas.
It is usually used for "hard copies" of drawings (print equivalent copy). The most common used contexts are Printer, PS and PDF.
+