From 18dc8b841de3c7acf274fe4a2fb21a37091c6cb0 Mon Sep 17 00:00:00 2001 From: scuri Date: Tue, 27 Sep 2011 19:06:19 +0000 Subject: *** empty log message *** --- html/en/drv/svg.html | 3 ++- html/en/func/coordinates.html | 13 ++++++++----- html/en/history.html | 12 ++++++++---- src/cd.c | 3 ++- src/drv/cdgl.c | 3 +-- src/svg/cdsvg.c | 2 +- test/simple/config.mak | 2 +- test/simple/simple.c | 2 ++ 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.

Coordinate System and Clipping

  • - UpdateYAxis: does nothing.
  • + UpdateYAxis: the orientation of axis Y is the + opposite to its orientation in the CD library.
  • Complex Regions: not supported.
  • Attributes

    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() -> (width, height, mm_width, mm_height: number) [in Lua] -

    Controls the orientation of the Y axis. Internally in some drivers the +

    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.

    + the current Y axis mode, if needs to be inverted internally or not.

    +

    Using 1 or 0 you can + control if the Y axis will be inverted or not. But this is not + 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.

    int cdCanvasUpdateYAxis(cdCanvas* canvas, int *y); [in C]
     double cdfCanvasUpdateYAxis(cdCanvas* canvas, double *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 @@
     
     
     

    History of Changes

    -

    CVS (15/Ago/2011)

    +

    CVS (27/Sep/2011)

    • New: functions cdContextIsPlus and cdContextType.
    • @@ -40,6 +40,13 @@ CD_RGBA. +
    • + Fixed: Arc, Sector and + Chord angles in + GDI+ base driver.
    • +
    • + Fixed: documentation of + YAxisMode.

    Version 5.4.1 (09/Nov/2010)

    @@ -88,9 +95,6 @@ mso-fareast-language:PT-BR;mso-bidi-language:AR-SA">CD_RGBA.
  • Fixed: resources release in Win32 double buffer driver.
  • -
  • - Fixed: Arc, Sector and Chord angles in - GDI+ base driver.
  • Version 5.4 (24/June/2010)

      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) -- cgit v1.2.3