diff options
author | scuri <scuri> | 2009-12-01 20:33:02 +0000 |
---|---|---|
committer | scuri <scuri> | 2009-12-01 20:33:02 +0000 |
commit | 837b9b863299bd05b5348b47f9c028091c70de61 (patch) | |
tree | cc64af440937937ca8e3d70e04e357ee29527a24 /html/en | |
parent | a70ccabdeb03fa5c6a2b1a594202659a7ebacd33 (diff) |
New: function CanvasYAxisMode to control the Y axis orientation.
Diffstat (limited to 'html/en')
-rw-r--r-- | html/en/func/coordinates.html | 20 | ||||
-rw-r--r-- | html/en/history.html | 2 |
2 files changed, 17 insertions, 5 deletions
diff --git a/html/en/func/coordinates.html b/html/en/func/coordinates.html index 9f119bb..a56b12d 100644 --- a/html/en/func/coordinates.html +++ b/html/en/func/coordinates.html @@ -18,6 +18,18 @@ canvas:GetSize() -> (width, height, mm_width, mm_height: number) [in Lua]</pr <p>Returns the canvas size in pixels and in millimeters. You can provide only the desired values and <font>NULL</font> for the others.</p> +<pre class="function"><span class="mainFunction">int <a name="cdYAxisMode">cdCanvasYAxisMode</a>(cdCanvas* canvas, int invert); [in C]</span> + +canvas:YAxisMode(invert: number) -> (old_invert: number) [in Lua]</pre> + + <p>Controls the orientation of the Y axis. Internally in some drivers the + native axis orientation is top-bottom, so the CD primitives must invert the + Y axis since the CD orientation is bottom-top. Using CD_QUERY will return + the current Y axis mode, if needs to be invert or not. Using 1 or 0 you can + control if the Y axis should be inverted or not independent from the native + orientation, with that you can in fact invert the orientation of the CD + primitives.</p> + <pre class="function"><span class="mainFunction">int <a name="cdUpdateYAxis">cdCanvasUpdateYAxis</a>(cdCanvas* canvas, int *y); [in C]</span> double cdfCanvasUpdateYAxis(cdCanvas* canvas, double *y); [in C] int cdCanvasInvertYAxis(cdCanvas* canvas, int y); [in C] @@ -26,11 +38,9 @@ double cdfCanvasInvertYAxis(cdCanvas* canvas, double y); [in C] canvas:UpdateYAxis(yc: number) -> (yr: number) [in Lua] canvas:InvertYAxis(yc: number) -> (yr: number) [in Lua]</pre> - <p>In some graph systems, the origin is at the upper left corner of the - canvas, with the direction of the Y axis pointing down. In this case, the - function converts the coordinate system of the CD library into the internal - system of the active canvas' driver, and the other way round. If this is not - the case, nothing happens. This is just <font>"y = height-1 - + <p>Converts the coordinate system of the CD library into the internal + system of the active canvas' driver, and the other way round, if they are + invert, or else do nothing. This is just <font>"y = height-1 - y"</font>. It returns the changed value. The "Invert" will always invert the given value, the "Update" function will invert only if the canvas has the Y axis inverted.</p> diff --git a/html/en/history.html b/html/en/history.html index ebecfbc..8a83f67 100644 --- a/html/en/history.html +++ b/html/en/history.html @@ -21,6 +21,8 @@ <h2>History of Changes</h2> <h3>CVS (01/Dec/2009)</h3> <ul> + <li><span style="color: #0000FF">New:</span> function <strong> + CanvasYAxisMode</strong> to control the Y axis orientation.</li> <li><span class="style1">Changed</span><span class="hist_changed">:</span> Freetype updated to version 2.3.11.</li> <li><span class="style1">Changed</span><span class="hist_changed">:</span> |