summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--html/en/drv/svg.html3
-rw-r--r--html/en/func/coordinates.html13
-rw-r--r--html/en/history.html12
-rw-r--r--src/cd.c3
-rw-r--r--src/drv/cdgl.c3
-rw-r--r--src/svg/cdsvg.c2
-rw-r--r--test/simple/config.mak2
-rw-r--r--test/simple/simple.c2
8 files changed, 25 insertions, 15 deletions
diff --git a/html/en/drv/svg.html b/html/en/drv/svg.html
index f05fc2f..1b4582c 100644
--- a/html/en/drv/svg.html
+++ b/html/en/drv/svg.html
@@ -54,7 +54,8 @@ being used then be aware that they will be affected.</p>
<h4>Coordinate System and Clipping </h4>
<dir>
<li><a href="../func/coordinates.html#cdUpdateYAxis"><font face="Courier">
- <strong>UpdateYAxis</strong></font></a>: does nothing.</li>
+ <strong>UpdateYAxis</strong></font></a>: the orientation of axis Y is the
+ opposite to its orientation in the CD library.</li>
<li><b>Complex Regions</b>: not supported.</li>
</dir>
<h4>Attributes</h4>
diff --git a/html/en/func/coordinates.html b/html/en/func/coordinates.html
index ce4ff9a..e8c45ea 100644
--- a/html/en/func/coordinates.html
+++ b/html/en/func/coordinates.html
@@ -22,13 +22,16 @@ canvas:GetSize() -&gt; (width, height, mm_width, mm_height: number) [in Lua]</pr
canvas:YAxisMode(invert: number) -&gt; (old_invert: number) [in Lua]</pre>
- <p>Controls the orientation of the Y axis. Internally in some drivers the
+ <p>Returns 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>
+ the current Y axis mode, if needs to be inverted internally or not.</p>
+ <p>Using 1 or 0 you can
+ control if the Y axis will be inverted or not. But this is <strong>not</strong>
+ recommended, because it has several limitations. Only drivers that the
+ native axis orientation is inverted can be controlled, drivers that has the
+ same orientation of the CD library can not be controlled. If changed Vector
+ Text will always displays the text upside down.</p>
</div><div class="function"><pre class="function"><span class="mainFunction">int&nbsp;<a name="cdUpdateYAxis">cdCanvasUpdateYAxis</a>(cdCanvas* canvas, int *y); [in C]</span>
double&nbsp;cdfCanvasUpdateYAxis(cdCanvas* canvas, double&nbsp;*y); [in C]
diff --git a/html/en/history.html b/html/en/history.html
index 6d7ad67..0644c9b 100644
--- a/html/en/history.html
+++ b/html/en/history.html
@@ -27,7 +27,7 @@
<body>
<h2>History of Changes</h2>
-<h3>CVS (15/Ago/2011)</h3>
+<h3>CVS (27/Sep/2011)</h3>
<ul>
<li><span class="hist_new">New:</span> functions <strong>cdContextIsPlus</strong>
and <strong>cdContextType</strong>.</li>
@@ -40,6 +40,13 @@
<span style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black;mso-ansi-language:PT-BR;
mso-fareast-language:PT-BR;mso-bidi-language:AR-SA">CD_RGBA.</span></li>
+ <li>
+ <span class="hist_fixed">Fixed:</span> <strong>Arc</strong>, <strong>Sector</strong> and
+ <strong>Chord</strong> angles in
+ GDI+ base driver.</li>
+ <li>
+ <span class="hist_fixed">Fixed:</span> documentation of <strong>
+ YAxisMode</strong>.</li>
</ul>
<h3><a href="http://sourceforge.net/projects/canvasdraw/files/5.4.1/">Version
5.4.1</a> (09/Nov/2010)</h3>
@@ -88,9 +95,6 @@ mso-fareast-language:PT-BR;mso-bidi-language:AR-SA">CD_RGBA.</span></li>
<li>
<span class="hist_fixed">Fixed:</span> resources release in Win32 double
buffer driver.</li>
- <li>
- <span class="hist_fixed">Fixed:</span> Arc, Sector and Chord angles in
- GDI+ base driver.</li>
</ul>
<h3><a href="http://sourceforge.net/projects/canvasdraw/files/5.4/">Version 5.4</a> (24/June/2010)</h3>
<ul>
diff --git a/src/cd.c b/src/cd.c
index f833037..1c6eb51 100644
--- a/src/cd.c
+++ b/src/cd.c
@@ -636,7 +636,8 @@ int cdCanvasYAxisMode(cdCanvas* canvas, int invert)
return canvas->invert_yaxis;
old_invert_yaxis = canvas->invert_yaxis;
- canvas->invert_yaxis = invert;
+ if (!(canvas->context->caps & CD_CAP_YAXIS))
+ canvas->invert_yaxis = invert;
return old_invert_yaxis;
}
diff --git a/src/drv/cdgl.c b/src/drv/cdgl.c
index deb7704..d88851f 100644
--- a/src/drv/cdgl.c
+++ b/src/drv/cdgl.c
@@ -441,8 +441,7 @@ static int sGetFontFileName(const char *font_name, int bold, int italic, char* f
{
if (cdStrEqualNoCasePartial(szName, localFontName))
{
- //"%s/%s.ttf"
- sprintf(fileName, "%s\\%s", sGetFontDir(), szData);
+ sprintf(fileName, "%s\\%s", sGetFontDir(), szData); // szData already includes file extension
bResult = 1;
break;
}
diff --git a/src/svg/cdsvg.c b/src/svg/cdsvg.c
index ca495e3..6f78ca3 100644
--- a/src/svg/cdsvg.c
+++ b/src/svg/cdsvg.c
@@ -1338,7 +1338,7 @@ static void cdinittable(cdCanvas* canvas)
static cdContext cdSVGContext =
{
- CD_CAP_ALL & ~(CD_CAP_CLEAR | CD_CAP_PLAY | CD_CAP_PALETTE |
+ CD_CAP_ALL & ~(CD_CAP_CLEAR | CD_CAP_PLAY | CD_CAP_PALETTE | CD_CAP_YAXIS |
CD_CAP_REGION | CD_CAP_IMAGESRV | CD_CAP_WRITEMODE |
CD_CAP_FONTDIM | CD_CAP_TEXTSIZE |
CD_CAP_GETIMAGERGB),
diff --git a/test/simple/config.mak b/test/simple/config.mak
index 590ec0e..b0d39bc 100644
--- a/test/simple/config.mak
+++ b/test/simple/config.mak
@@ -37,7 +37,7 @@ USE_STATIC = Yes
#IUP = ../../../iup
#CD = ../..
-USE_OPENGL = Yes
+#USE_OPENGL = Yes
ifdef USE_OPENGL
DEFINES += USE_OPENGL
endif
diff --git a/test/simple/simple.c b/test/simple/simple.c
index c47812e..f3b17fe 100644
--- a/test/simple/simple.c
+++ b/test/simple/simple.c
@@ -562,6 +562,8 @@ void SimpleDraw(cdCanvas* canvas)
/* refresh CD canvas size, when window size has changed */
cdCanvasActivate(canvas);
+// cdCanvasYAxisMode(canvas, 0);
+
if (simple_draw == DRAW_TEXTFONTS)
SimpleDrawTextFonts(canvas);
else if (simple_draw == DRAW_TEXTALIGN)