summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);