diff options
-rw-r--r-- | html/en/history.html | 3 | ||||
-rw-r--r-- | mak.vc9/cd.sln | 2 | ||||
-rw-r--r-- | mak.vc9/cdcairo.vcproj | 1 | ||||
-rw-r--r-- | src/cairo/cdcairo.c | 24 | ||||
-rw-r--r-- | src/cairo/cdcairoctx.h | 1 | ||||
-rw-r--r-- | src/cairo/cdcairodbuf.c | 3 | ||||
-rw-r--r-- | src/cairo/cdcairoimg.c | 2 | ||||
-rw-r--r-- | src/cairo/cdcairoirgb.c | 2 | ||||
-rw-r--r-- | src/cairo/cdcaironative_gdk.c | 2 | ||||
-rw-r--r-- | src/cairo/cdcairopdf.c | 2 | ||||
-rw-r--r-- | src/cairo/cdcairops.c | 2 | ||||
-rw-r--r-- | src/cairo/cdcairosvg.c | 2 | ||||
-rw-r--r-- | src/drv/cdpdf.c | 2 | ||||
-rw-r--r-- | test/cdtest/cdtest.c | 2 |
14 files changed, 16 insertions, 34 deletions
diff --git a/html/en/history.html b/html/en/history.html index 27000a0..3029b31 100644 --- a/html/en/history.html +++ b/html/en/history.html @@ -19,8 +19,9 @@ <body> <h2>History of Changes</h2> -<h3>CVS (26/Feb/2010)</h3> +<h3>CVS (12/May/2010)</h3> <ul> + <li><span style="color: #0000FF">New:</span> context plus driver Cairo.</li> <li><span style="color: #0000FF">New:</span> "CMD", "OPACITY" and "HATCHBOXSIZE" attributes in the SVG driver.</li> <li><span class="style1">Changed</span><span class="hist_changed">:</span> diff --git a/mak.vc9/cd.sln b/mak.vc9/cd.sln index 7def44e..20e7f2e 100644 --- a/mak.vc9/cd.sln +++ b/mak.vc9/cd.sln @@ -112,7 +112,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{1EE89DAC-3 EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdcairo", "cdcairo.vcproj", "{01818D2C-AAAA-DD23-00AA-5678401C6461}" ProjectSection(ProjectDependencies) = postProject - {01818D2C-1234-4D5C-ABCD-4DFF401C6461} = {01818D2C-1234-4D5C-ABCD-4DFF401C6461} + {01818D2C-AAAA-4D5C-ABCD-1234401C6461} = {01818D2C-AAAA-4D5C-ABCD-1234401C6461} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdtestcairo", "cdtestcairo.vcproj", "{A7E49FB8-0022-15EC-AB17-FFCDC7E83C00}" diff --git a/mak.vc9/cdcairo.vcproj b/mak.vc9/cdcairo.vcproj index ec7c1e5..9e3184d 100644 --- a/mak.vc9/cdcairo.vcproj +++ b/mak.vc9/cdcairo.vcproj @@ -66,7 +66,6 @@ /> <Tool Name="VCLibrarianTool" - AdditionalDependencies="cdcore.lib" OutputFile="$(OutDir)/$(ProjectName).lib" AdditionalLibraryDirectories="$(OutDir)" SuppressStartupBanner="true" diff --git a/src/cairo/cdcairo.c b/src/cairo/cdcairo.c index 34fdef7..83cf088 100644 --- a/src/cairo/cdcairo.c +++ b/src/cairo/cdcairo.c @@ -14,14 +14,11 @@ #include "cdcairoctx.h" -#define HATCH_WIDTH 8 -#define HATCH_HEIGHT 8 #ifndef M_PI #define M_PI 3.14159265358979323846 #endif - static int StrIsAscii(const char* str) { while(*str) @@ -294,12 +291,12 @@ static void cdstipple(cdCtxCanvas *ctxcanvas, int n, int m, const unsigned char static int cdhatch(cdCtxCanvas *ctxcanvas, int style) { - int hsize = HATCH_WIDTH - 1; + int hsize = ctxcanvas->hatchboxsize; int hhalf = hsize / 2; cairo_surface_t* hatch_surface; cairo_t* cr; - hatch_surface = cairo_surface_create_similar(cairo_get_target(ctxcanvas->cr), CAIRO_CONTENT_COLOR_ALPHA, HATCH_WIDTH, HATCH_HEIGHT); + hatch_surface = cairo_surface_create_similar(cairo_get_target(ctxcanvas->cr), CAIRO_CONTENT_COLOR_ALPHA, hsize, hsize); cr = cairo_create(hatch_surface); @@ -366,21 +363,6 @@ static int cdhatch(cdCtxCanvas *ctxcanvas, int style) /* attributes */ /******************************************************/ -static int cdwritemode(cdCtxCanvas *ctxcanvas, int write_mode) -{ - switch (write_mode) - { - case CD_REPLACE: - cairo_set_operator (ctxcanvas->cr, CAIRO_OPERATOR_OVER); - break; - case CD_XOR: - cairo_set_operator (ctxcanvas->cr, CAIRO_OPERATOR_XOR); - break; - } - - return write_mode; -} - static int cdinteriorstyle (cdCtxCanvas* ctxcanvas, int style) { switch (style) @@ -1676,6 +1658,7 @@ cdCtxCanvas *cdcairoCreateCanvas(cdCanvas* canvas, cairo_t* cr) ctxcanvas->cr = cr; ctxcanvas->canvas = canvas; ctxcanvas->last_source = -1; + ctxcanvas->hatchboxsize = 8; canvas->ctxcanvas = ctxcanvas; canvas->invert_yaxis = 1; @@ -1735,7 +1718,6 @@ void cdcairoInitTable(cdCanvas* canvas) canvas->cxGetFontDim = cdgetfontdim; canvas->cxGetTextSize = cdgettextsize; canvas->cxTransform = cdtransform; - canvas->cxWriteMode = cdwritemode; canvas->cxForeground = cdforeground; canvas->cxGetImageRGB = cdgetimagergb; diff --git a/src/cairo/cdcairoctx.h b/src/cairo/cdcairoctx.h index 266cfb3..7516875 100644 --- a/src/cairo/cdcairoctx.h +++ b/src/cairo/cdcairoctx.h @@ -31,6 +31,7 @@ struct _cdCtxCanvas cairo_pattern_t *pattern, *solid; int last_source; + int hatchboxsize; char* cairoLastConvertUTF8; diff --git a/src/cairo/cdcairodbuf.c b/src/cairo/cdcairodbuf.c index 0e23f06..4861014 100644 --- a/src/cairo/cdcairodbuf.c +++ b/src/cairo/cdcairodbuf.c @@ -155,8 +155,7 @@ static void cdinittable(cdCanvas* canvas) static cdContext cdDBufferContext = { - CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_YAXIS | - CD_CAP_FPRIMTIVES ), + CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_YAXIS | CD_CAP_REGION | CD_CAP_WRITEMODE | CD_CAP_PALETTE ), 0, cdcreatecanvas, cdinittable, diff --git a/src/cairo/cdcairoimg.c b/src/cairo/cdcairoimg.c index 54c2fa7..4eda676 100644 --- a/src/cairo/cdcairoimg.c +++ b/src/cairo/cdcairoimg.c @@ -37,7 +37,7 @@ static void cdinittable(cdCanvas* canvas) static cdContext cdImageContext = { - CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_YAXIS | CD_CAP_FPRIMTIVES ), + CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_YAXIS | CD_CAP_REGION | CD_CAP_WRITEMODE | CD_CAP_PALETTE ), 0, cdcreatecanvas, cdinittable, diff --git a/src/cairo/cdcairoirgb.c b/src/cairo/cdcairoirgb.c index 1bb9698..b326834 100644 --- a/src/cairo/cdcairoirgb.c +++ b/src/cairo/cdcairoirgb.c @@ -145,7 +145,7 @@ static void cdinittable(cdCanvas* canvas) static cdContext cdCairoImageRGBContext = { - CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_YAXIS | CD_CAP_REGION | CD_CAP_FPRIMTIVES), + CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_YAXIS | CD_CAP_REGION | CD_CAP_WRITEMODE | CD_CAP_PALETTE), 0, cdcreatecanvas, cdinittable, diff --git a/src/cairo/cdcaironative_gdk.c b/src/cairo/cdcaironative_gdk.c index 98face0..29be6c6 100644 --- a/src/cairo/cdcaironative_gdk.c +++ b/src/cairo/cdcaironative_gdk.c @@ -65,7 +65,7 @@ static void cdinittable(cdCanvas* canvas) static cdContext cdNativeWindowContext = { - CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_YAXIS | CD_CAP_REGION | CD_CAP_WRITEMODE | CD_CAP_PALETTE | CD_CAP_FPRIMTIVES), + CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_YAXIS | CD_CAP_REGION | CD_CAP_WRITEMODE | CD_CAP_PALETTE), 1, cdcreatecanvas, cdinittable, diff --git a/src/cairo/cdcairopdf.c b/src/cairo/cdcairopdf.c index 880a2e5..f17fff4 100644 --- a/src/cairo/cdcairopdf.c +++ b/src/cairo/cdcairopdf.c @@ -108,7 +108,7 @@ static void cdinittable(cdCanvas* canvas) static cdContext cdCairoPDFContext = { - CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_YAXIS | CD_CAP_REGION | CD_CAP_FPRIMTIVES), + CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_YAXIS | CD_CAP_REGION | CD_CAP_WRITEMODE | CD_CAP_PALETTE), 0, cdcreatecanvas, cdinittable, diff --git a/src/cairo/cdcairops.c b/src/cairo/cdcairops.c index ed58723..52268e5 100644 --- a/src/cairo/cdcairops.c +++ b/src/cairo/cdcairops.c @@ -155,7 +155,7 @@ static void cdinittable(cdCanvas* canvas) static cdContext cdCairoPSContext = { - CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_YAXIS | CD_CAP_REGION | CD_CAP_FPRIMTIVES), + CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_YAXIS | CD_CAP_REGION | CD_CAP_WRITEMODE | CD_CAP_PALETTE), 0, cdcreatecanvas, cdinittable, diff --git a/src/cairo/cdcairosvg.c b/src/cairo/cdcairosvg.c index ce36758..0f528fa 100644 --- a/src/cairo/cdcairosvg.c +++ b/src/cairo/cdcairosvg.c @@ -67,7 +67,7 @@ static void cdinittable(cdCanvas* canvas) static cdContext cdCairoSVGContext = { - CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_YAXIS | CD_CAP_REGION | CD_CAP_FPRIMTIVES), + CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_YAXIS | CD_CAP_REGION | CD_CAP_WRITEMODE | CD_CAP_PALETTE), 0, cdcreatecanvas, cdinittable, diff --git a/src/drv/cdpdf.c b/src/drv/cdpdf.c index 6a20748..f2c608f 100644 --- a/src/drv/cdpdf.c +++ b/src/drv/cdpdf.c @@ -799,7 +799,7 @@ static int cdhatch(cdCtxCanvas *ctxcanvas, int style) int hhalf = hsize / 2; PDF_suspend_page(ctxcanvas->pdf, ""); - ctxcanvas->pattern = PDF_begin_pattern(ctxcanvas->pdf, hsize+1, hsize+1, + ctxcanvas->pattern = PDF_begin_pattern(ctxcanvas->pdf, hsize, hsize, ((double)hsize)*ctxcanvas->scale, ((double)hsize)*ctxcanvas->scale, 1); PDF_scale(ctxcanvas->pdf, ctxcanvas->scale, ctxcanvas->scale); diff --git a/test/cdtest/cdtest.c b/test/cdtest/cdtest.c index 1e6375b..536cfc2 100644 --- a/test/cdtest/cdtest.c +++ b/test/cdtest/cdtest.c @@ -229,7 +229,7 @@ void CDTestInit(void) if (use_contextplus) { -#ifdef USE_GDIPLUS +#ifdef USE_CONTEXTPLUS cdInitContextPlus(); #endif } |