summaryrefslogtreecommitdiff
path: root/src
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 /src
parentc6f54dc9529bdfe943d2b5569aebf4a8b8ce5581 (diff)
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/svg/cdsvg.c8
1 files changed, 6 insertions, 2 deletions
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);