summaryrefslogtreecommitdiff
path: root/gs/base/gdevpdfx.h
diff options
context:
space:
mode:
authorKen Sharp <ken.sharp@artifex.com>2010-06-02 07:46:57 +0000
committerKen Sharp <ken.sharp@artifex.com>2010-06-02 07:46:57 +0000
commit92d5312bec824209306c54fef8f116bae4d9ecb6 (patch)
tree4e37d95534aed164e1ca20ebb1635c315327b76a /gs/base/gdevpdfx.h
parent5a435938f7225ea9a83bd4778e69392b9294dd6d (diff)
Fix pdfwrite, faulty matrix transformations for Shading dictionaries
Bug #691352 "cairo pdf mis-distilled" Patterns in PDF are unpleasantly complicated by the need to transform the pattern to the 'default co-ordinate space'. Normally this means that we undo the resolution scaling which is normally applied to the CTM. For page streams this works well, but for forms the 'default co-ordinate space' is the space of the parent. For one level of form there is therefore no difference between the page and the form. When forms are nested however, the lower form's space becomes that of the parent. This means that patterns inside forms, which are nested inside another form, need to be transformed to the parent form co-ordinate space, not the page space. Since we don't currently emit forms from pdfwrite for anything except transparency groups what this means in practice is that we don't undo the CTM transformation if we are rendering a pattern inside a form, nested inside at least one other form. Expected Differences These files show progressions with this change: Buig690831.pdf Bug690208.pdf Bug690206.pdf Bug690115.pdf Catx5233.pdf These files show progressions, but also show regressions or are still not properly converted to PDF: Bug688807.pdf Bug689918.pdf This does not conclude the work for bug #691352, and the two files which still exhibit issues also require further work. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11347 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'gs/base/gdevpdfx.h')
-rw-r--r--gs/base/gdevpdfx.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gs/base/gdevpdfx.h b/gs/base/gdevpdfx.h
index 612ecc26b..6ac68ba9d 100644
--- a/gs/base/gdevpdfx.h
+++ b/gs/base/gdevpdfx.h
@@ -611,6 +611,15 @@ struct gx_device_pdf_s {
int sbstack_depth;
pdf_substream_save *sbstack;
+ /* Temporary workaround. The only way to get forms out of pdfwrite at present
+ * is via a transparency group or mask operation. Ordinarily we don't care
+ * much about forms, but Patterns within forms need to be scaled to the
+ * CTM of the Pattern, not the default page co-ordinate system. We use
+ * this value to know if we are nested inside a form or not. If we are
+ * we don't undo the resolution co-ordinate transform.
+ */
+ int FormDepth;
+
/* Accessories */
cos_dict_t *substream_Resources; /* Substream resources */
gs_color_space_index pcm_color_info_index; /* Index of the ProcessColorModel space. */