summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorscuri <scuri>2010-02-26 15:38:33 +0000
committerscuri <scuri>2010-02-26 15:38:33 +0000
commitb789da6300f0e48c93b9703e368588d2796cc0a3 (patch)
treee11e230e12e773c2586a5b1c02b79c6cd6bb5dd1
parentc6f54dc9529bdfe943d2b5569aebf4a8b8ce5581 (diff)
*** empty log message ***
-rw-r--r--html/en/history.html2
-rw-r--r--src/svg/cdsvg.c8
2 files changed, 7 insertions, 3 deletions
diff --git a/html/en/history.html b/html/en/history.html
index d5903e4..7692bb2 100644
--- a/html/en/history.html
+++ b/html/en/history.html
@@ -28,7 +28,7 @@
supported.</li>
<li><span style="color: #FF0000">Fixed:</span> SVG driver support for
BackOpacity=OPAQUE in Hatch. Transform and Clipping conflict. InteriorStyle
- initialization.</li>
+ initialization. Pattern orientation was upside down.</li>
</ul>
<h3><a href="http://sourceforge.net/projects/canvasdraw/files/5.3/">Version 5.3</a> (26/Jan/2010)</h3>
<ul>
diff --git a/src/svg/cdsvg.c b/src/svg/cdsvg.c
index c657825..11f5bb3 100644
--- a/src/svg/cdsvg.c
+++ b/src/svg/cdsvg.c
@@ -599,7 +599,7 @@ static int cdhatch(cdCtxCanvas *ctxcanvas, int style)
static void make_pattern(cdCtxCanvas *ctxcanvas, int n, int m, void* data, int (*data2rgb)(cdCtxCanvas *ctxcanvas, int n, int i, int j, void* data, unsigned char*r, unsigned char*g, unsigned char*b))
{
- int i, j;
+ int i, j, ret;
unsigned char r, g, b;
char color[20];
@@ -610,7 +610,11 @@ static void make_pattern(cdCtxCanvas *ctxcanvas, int n, int m, void* data, int (
{
for (i = 0; i < n; i++)
{
- int ret = data2rgb(ctxcanvas, n, i, j, data, &r, &g, &b);
+ if (ctxcanvas->canvas->invert_yaxis)
+ ret = data2rgb(ctxcanvas, n, i, m-1 - j, data, &r, &g, &b);
+ else
+ ret = data2rgb(ctxcanvas, n, i, j, data, &r, &g, &b);
+
if (ret == -1) continue;
sprintf(color, "rgb(%d,%d,%d)", (int)r, (int)g, (int)b);