diff options
Diffstat (limited to 'cd/src/cd.c')
-rwxr-xr-x | cd/src/cd.c | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/cd/src/cd.c b/cd/src/cd.c index 600a1a9..3d20015 100755 --- a/cd/src/cd.c +++ b/cd/src/cd.c @@ -20,6 +20,7 @@ /* This appears only here to avoid changing the cd.h header fo bug fixes */ #define CD_VERSION_FIX "" #define CD_VERSION_FIX_NUMBER 0 +/* #define CD_VERSION_FIX_DATE "" */ const char cd_ident[] = "$CD: " CD_VERSION CD_VERSION_FIX " " CD_COPYRIGHT " $\n" @@ -36,7 +37,11 @@ char* cdVersion(void) char* cdVersionDate(void) { +#ifdef CD_VERSION_FIX_DATE + return CD_VERSION_FIX_DATE; +#else return CD_VERSION_DATE; +#endif } int cdVersionNumber(void) @@ -48,7 +53,7 @@ static void cd_setdefaultfunc(cdCanvas* canvas) { canvas->cxGetTextSize = cdgettextsizeEX; canvas->cxGetFontDim = cdgetfontdimEX; - canvas->cxRect = cdrectSIM; + canvas->cxRect = cdSimRect; } static void cd_setdefaultattrib(cdCanvas* canvas) @@ -271,44 +276,48 @@ int cdCanvasSimulate(cdCanvas* canvas, int mode) if (mode & CD_SIM_LINE) { - canvas->cxLine = cdlineSIM; + canvas->cxLine = cdSimLine; canvas->cxFLine = NULL; } if (mode & CD_SIM_RECT) { - canvas->cxRect = cdrectSIM; + canvas->cxRect = cdSimRect; canvas->cxFRect = NULL; } if (mode & CD_SIM_BOX) { - canvas->cxBox = cdboxSIM; + canvas->cxBox = cdSimBox; canvas->cxFBox = NULL; } if (mode & CD_SIM_ARC) { - canvas->cxArc = cdarcSIM; + canvas->cxArc = cdSimArc; canvas->cxFArc = NULL; } if (mode & CD_SIM_SECTOR) { - canvas->cxSector = cdsectorSIM; + canvas->cxSector = cdSimSector; canvas->cxFSector = NULL; } if (mode & CD_SIM_CHORD) { - canvas->cxChord = cdchordSIM; + canvas->cxChord = cdSimChord; canvas->cxFChord = NULL; } canvas->cxFont(canvas->ctxcanvas, canvas->font_type_face, canvas->font_style, canvas->font_size); if (mode & CD_SIM_POLYLINE || mode & CD_SIM_POLYGON) + { + /* can NOT replace canvas->cxPoly because it will be used by the simulation, + handle polygon simulation in Begin/End */ canvas->cxFPoly = NULL; + } return sim_mode; } @@ -702,14 +711,13 @@ static cdContext* context_plus[NUM_CONTEXTPLUS] = {NULL, NULL, NULL, NULL, NULL, int cdUseContextPlus(int use) { + int old_use_context_plus = use_context_plus; + if (use == CD_QUERY) return use_context_plus; - { - int old_use_context_plus = use_context_plus; - use_context_plus = use; - return old_use_context_plus; - } + use_context_plus = use; + return old_use_context_plus; } void cdInitContextPlusList(cdContext* ctx_list[]) |