diff options
author | scuri <scuri> | 2010-01-05 19:45:28 +0000 |
---|---|---|
committer | scuri <scuri> | 2010-01-05 19:45:28 +0000 |
commit | b710c137606af849d0864dbe5190ed29afdac10f (patch) | |
tree | 2b98a8e5ad11be4a672733b7667d74fd8baa207d /src | |
parent | ee94ff97d89c35170ec1b02e1b78085f05aa1f44 (diff) |
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r-- | src/wd.c | 6 | ||||
-rw-r--r-- | src/win32/cdwin.c | 2 |
2 files changed, 5 insertions, 3 deletions
@@ -522,7 +522,7 @@ void wdCanvasGetTextBounds(cdCanvas* canvas, double x, double y, const char *s, void wdCanvasPattern(cdCanvas* canvas, int w, int h, const long *color, double w_mm, double h_mm) { - long *pattern = 0; + long *pattern = NULL; int w_pxl, h_pxl, x, y, cx, cy; int wratio, hratio; int *XTab, *YTab; @@ -531,6 +531,7 @@ void wdCanvasPattern(cdCanvas* canvas, int w, int h, const long *color, double w cdCanvasMM2Pixel(canvas, w_mm, h_mm, &w_pxl, &h_pxl); + /* to preserve the pattern characteristics must be an integer number */ wratio = cdRound((double)w_pxl/(double)w); hratio = cdRound((double)h_pxl/(double)h); @@ -564,7 +565,7 @@ void wdCanvasPattern(cdCanvas* canvas, int w, int h, const long *color, double w void wdCanvasStipple(cdCanvas* canvas, int w, int h, const unsigned char *fgbg, double w_mm, double h_mm) { - unsigned char *stipple = 0; + unsigned char *stipple = NULL; int w_pxl, h_pxl, x, y, cx, cy; int wratio, hratio; int *XTab, *YTab; @@ -573,6 +574,7 @@ void wdCanvasStipple(cdCanvas* canvas, int w, int h, const unsigned char *fgbg, cdCanvasMM2Pixel(canvas, w_mm, h_mm, &w_pxl, &h_pxl); + /* to preserve the pattern characteristics must be an integer number */ wratio = cdRound((double)w_pxl/(double)w); hratio = cdRound((double)h_pxl/(double)h); diff --git a/src/win32/cdwin.c b/src/win32/cdwin.c index 4b38187..313e833 100644 --- a/src/win32/cdwin.c +++ b/src/win32/cdwin.c @@ -595,7 +595,7 @@ static void cdpattern(cdCtxCanvas* ctxcanvas, int w, int h, const long int *colo if (!cdwCreateDIB(&dib)) return; - /* important to preserve pattern size during printing */ + /* trying to preserve pattern size during printing */ set_dib_res(&dib, ctxcanvas); cdwDIBEncodePattern(&dib, colors); |