summaryrefslogtreecommitdiff
path: root/fitz/dev_list.c
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2010-05-11 01:02:38 +0200
committerTor Andersson <tor@ghostscript.com>2010-05-11 01:02:38 +0200
commite43e0c7a92fdff506ad846ad1769606549dc1b2b (patch)
treeeb84656d36b55d4e2063993586d711cff835ebbf /fitz/dev_list.c
parentb543b9026b6b08c4dd2482cfdfa20b5c5f41470b (diff)
downloadmupdf-e43e0c7a92fdff506ad846ad1769606549dc1b2b.tar.xz
Accumulate text to be clipped in text render mode 7.
Diffstat (limited to 'fitz/dev_list.c')
-rw-r--r--fitz/dev_list.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/fitz/dev_list.c b/fitz/dev_list.c
index 2abdabbf..88a0bdf5 100644
--- a/fitz/dev_list.c
+++ b/fitz/dev_list.c
@@ -12,7 +12,7 @@ fz_newdisplaynode(fz_displaycommand cmd, fz_matrix ctm,
node->next = nil;
node->item.path = nil;
node->stroke = nil;
- node->evenodd = 0;
+ node->flag = 0;
node->ctm = ctm;
if (colorspace)
{
@@ -95,7 +95,7 @@ fz_listfillpath(void *user, fz_path *path, int evenodd, fz_matrix ctm,
fz_displaynode *node;
node = fz_newdisplaynode(FZ_CMDFILLPATH, ctm, colorspace, color, alpha);
node->item.path = fz_clonepath(path);
- node->evenodd = evenodd;
+ node->flag = evenodd;
fz_appenddisplaynode(user, node);
}
@@ -116,7 +116,7 @@ fz_listclippath(void *user, fz_path *path, int evenodd, fz_matrix ctm)
fz_displaynode *node;
node = fz_newdisplaynode(FZ_CMDCLIPPATH, ctm, nil, nil, 0.0);
node->item.path = fz_clonepath(path);
- node->evenodd = evenodd;
+ node->flag = evenodd;
fz_appenddisplaynode(user, node);
}
@@ -152,11 +152,12 @@ fz_liststroketext(void *user, fz_text *text, fz_strokestate *stroke, fz_matrix c
}
static void
-fz_listcliptext(void *user, fz_text *text, fz_matrix ctm)
+fz_listcliptext(void *user, fz_text *text, fz_matrix ctm, int accumulate)
{
fz_displaynode *node;
node = fz_newdisplaynode(FZ_CMDCLIPTEXT, ctm, nil, nil, 0.0);
node->item.text = fz_clonetext(text);
+ node->flag = accumulate;
fz_appenddisplaynode(user, node);
}
@@ -281,7 +282,7 @@ fz_executedisplaylist(fz_displaylist *list, fz_device *dev, fz_matrix topctm)
switch (node->cmd)
{
case FZ_CMDFILLPATH:
- dev->fillpath(dev->user, node->item.path, node->evenodd, ctm,
+ dev->fillpath(dev->user, node->item.path, node->flag, ctm,
node->colorspace, node->color, node->alpha);
break;
case FZ_CMDSTROKEPATH:
@@ -289,7 +290,7 @@ fz_executedisplaylist(fz_displaylist *list, fz_device *dev, fz_matrix topctm)
node->colorspace, node->color, node->alpha);
break;
case FZ_CMDCLIPPATH:
- dev->clippath(dev->user, node->item.path, node->evenodd, ctm);
+ dev->clippath(dev->user, node->item.path, node->flag, ctm);
break;
case FZ_CMDCLIPSTROKEPATH:
dev->clipstrokepath(dev->user, node->item.path, node->stroke, ctm);
@@ -303,7 +304,7 @@ fz_executedisplaylist(fz_displaylist *list, fz_device *dev, fz_matrix topctm)
node->colorspace, node->color, node->alpha);
break;
case FZ_CMDCLIPTEXT:
- dev->cliptext(dev->user, node->item.text, ctm);
+ dev->cliptext(dev->user, node->item.text, ctm, node->flag);
break;
case FZ_CMDCLIPSTROKETEXT:
dev->clipstroketext(dev->user, node->item.text, node->stroke, ctm);