summaryrefslogtreecommitdiff
path: root/src/cairo-ps-surface.c
AgeCommit message (Collapse)AuthorFilesLines
2011-09-15ps: Check earlier for a supported maskChris Wilson1-6/+4
Fixes crash in fill-and-stroke-alpha. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-15ps: Fix return value for mask_supported and ps2Chris Wilson1-3/+3
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-15ps: Set transparency for stencil_masksChris Wilson1-14/+10
Fixes crash in a8-mask. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-13ps: turn off debugAdrian Johnson1-1/+1
2011-09-12Introduce a new compositor architectureChris Wilson1-98/+113
Having spent the last dev cycle looking at how we could specialize the compositors for various backends, we once again look for the commonalities in order to reduce the duplication. In part this is motivated by the idea that spans is a good interface for both the existent GL backend and pixman, and so they deserve a dedicated compositor. xcb/xlib target an identical rendering system and so they should be using the same compositor, and it should be possible to run that same compositor locally against pixman to generate reference tests. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> P.S. This brings massive upheaval (read breakage) I've tried delaying in order to fix as many things as possible but now this one patch does far, far, far too much. Apologies in advance for breaking your favourite backend, but trust me in that the end result will be much better. :)
2011-09-11ps: improve formatting of fallback image commentAdrian Johnson1-1/+1
2011-09-11ps: use reusable stream for mesh pattern dataAdrian Johnson1-11/+18
File data used by a shading pattern must reusable since the pattern may read the file multiple times. As currentfile is not reusable, use the /ReusableStreamDecode to make it reusable.
2011-09-06ps/pdf: fix the polarity of stencil masksAdrian Johnson1-1/+1
2011-09-06ps: support stencil masksAdrian Johnson1-89/+206
When the mask is an A1 image (or can be reduced to A1) use the imagemask operator.
2011-09-05ps: each row of 1-bit image data needs to begin on a byte boundaryAdrian Johnson1-0/+2
2011-08-29ps/pdf: use a new clipper object when emitting a recording surfaceAdrian Johnson1-0/+14
2011-08-14ps: unwrap recording surface snapshotsChris Wilson1-1/+13
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-14ps: use deflate compression for ps level 3Adrian Johnson1-35/+74
2011-08-13Only reduce the clip if it is not in active use for the operationChris Wilson1-14/+4
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13image: move surface definition to new header for subclassingChris Wilson1-0/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-06ps: use show_text_glyphsAdrian Johnson1-12/+29
to ensure that when the PS is converted to PDF the text can be extracted.
2011-08-04ps: check if images are grayscale or monochrome and encode as suchAdrian Johnson1-52/+110
Printing PDFs with large monochrome or grayscale images would result in the images being blown up to 24-bit color images. Some printers are very slow to print huge color images.
2011-07-29ps: remove unnecessary flushAdrian Johnson1-4/+0
that was preventing string of glyphs from separate calls to cairo_show_glyphs() being merged.
2011-07-29ps: Apply the clip reduction techniques from pdfChris Wilson1-4/+32
If the clip wholly covers the operation, we do not need to set one, and if the current clip similarly covers the operation we do not to unset it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-26composite: Pass unbounded extents to initialisationChris Wilson1-12/+17
For an unbounded surface we cannot assume (0, 0, surface_width, surface_height) as that is wrong and causes the operation to appear clipped. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-26API: map-to-image and create-similar-imageChris Wilson1-1/+6
A common requirement is the fast upload of pixel data. In order to allocate the most appropriate image buffer, we need knowledge of the destination. The most obvious example is that we could use a shared-memory region for the image to avoid the transfer cost of uploading the pixels to the X server. Similarly, gl, win32, quartz... The other side of the equation is that for manual modification of a remote surface, it would be more efficient if we can create a similar image to reduce the transfer costs. This strategy is already followed for the destination fallbacks and this merely exposes the same capability for the application fallbacks. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-20ps: Don't return CAIRO_INT_STATUS_NOTHING_TO_DO for empty glyphsAdrian Johnson1-1/+5
2011-07-20Remove HAS_FT_FONT from cairo-scaled-font-subsets-private.hAdrian Johnson1-19/+0
Should have been removed when the FT dependency was removed from type 1.
2011-07-19clip: Rudimentary support for clip-polygon extractionChris Wilson1-21/+20
Step 1, fix the failings sighted recently by tracking clip-boxes as an explicit property of the clipping and of composition. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-19ps: Add HAS_FT_FONT guards for type1Chris Wilson1-0/+20
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-18type1-subset: Remove FT dependency part 6Adrian Johnson1-4/+0
Remove all remaining FT dependencies from the Type1 subsetting.
2011-07-15Implement cairo_backend_tChris Wilson1-0/+3
Allow a backend to completely reimplement the Cairo API as it wants. The goal is to pass operations to the native backends such as Quartz, Direct2D, Qt, Skia, OpenVG with no overhead. And to permit complete logging contexts, and whatever else the imagination holds. Perhaps to experiment with double-paths? Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-05-22PS: Use tight bounding boxAdrian Johnson1-11/+4
Now that the page size is specified by %%DocumentMedia we can make %%BoundingBox compliant.
2011-01-18pdf,ps,quartz: Use correct tolerance for gradient domain computationAndrea Canciani1-3/+7
The tolerance argument of _cairo_gradient_pattern_box_to_parameter () is in pattern space, so to have it constant in device space, it should depend on the pattern matrix. In ps and pdf the fallback resolution alone is not meaningful. The resolution/fallback_resolution ratio should be used instead.
2011-01-16doc: Fix some broken references and gtk-doc warningsMaarten Bosmans1-19/+20
The gtk-doc comments contain some typos and are missing some escaping.
2011-01-01pdf,ps: Add native mesh pattern supportAdrian Johnson1-0/+84
PS and PDF have native support for mesh patterns, but they have encode mesh points and colors in an appropriate binary stream. cairo_pdf_shading_* functions implement the encoding, which is the same for PDF and PS.
2010-12-13ps,pdf: Deal with empty domain gradients.Andrea Canciani1-5/+45
If all the stops of the gradient have the same offset and the pattern's extend mode is EXTEND_PAD, then we cannot use the stops' domain as the interpolation parameter range because this would produce a gradient with the same start and end objects. Such ranges tickle bad behaviour in rasterisers. We replace the color function with an appropriate step function defined on [0 1]. Fixes radial-gradient-one-stop for pdf and ps3. Reviewed-by: M Joonas Pihlaja <jpihlaja@cc.helsinki.fi>
2010-12-13ps: Unify gradient emitters and support all extend modes.Andrea Canciani1-168/+88
To draw repeated gradients in ps, which only supports none and pad extended gradients, we need an appropriate reparametrization of the gradients that will cover the whole clip region without needing repeats. This commit adds support for the drawing of reflect/repeat-extended radial gradients through native ps patterns, using pad-extension and no fallbacks. Reviewed-by: M Joonas Pihlaja <jpihlaja@cc.helsinki.fi>
2010-12-13ps: Avoid unneeded fallbacks for gradients with opaque stops.Andrea Canciani1-1/+7
_cairo_pattern_is_opaque() returns false for none-extended linear gradients and for radial gradients, but fallback is only needed if they have non-opaque stops. This can be tested using _cairo_pattern_alpha_range(), which only analyses the part of the pattern which is drawn. Reviewed-by: M Joonas Pihlaja <jpihlaja@cc.helsinki.fi>
2010-12-13ps, pdf, pattern: Implement _cairo_pattern_alpha_range to analyse patterns.Andrea Canciani1-8/+4
Both the ps and pdf backends are open coding analyses of the range of pattern alphas. This patch factors out a new function _cairo_pattern_alpha_range() to do that for them. Reviewed-by: M Joonas Pihlaja <jpihlaja@cc.helsinki.fi>
2010-12-13ps: Use switch instead of multiple if'sAndrea Canciani1-5/+9
This ensures that the compiler is able to automatically point out any unhandled pattern type. Reviewed-by: M Joonas Pihlaja <jpihlaja@cc.helsinki.fi>
2010-11-23ps: Fix paintingAndrea Canciani1-3/+2
Painting of some pattern was broken because the paint operation was implemented as a fill to a rect containing the clip, but this rect was not transformed as appropriate (using the cairo_to_ps matrix). PDF simply fills the whole surface rect, so we implement the same behavior in PS. Fixes clip-group-shapes-circles, clip-stroke, linear-gradient-extend, linear-gradient-one-stop, radial-gradient-one-stop.
2010-11-20PS: Fix regression - missing page content in EPS outputAdrian Johnson1-9/+0
https://bugs.freedesktop.org/show_bug.cgi?id=24688
2010-11-20PS/PDF: Fix regression when changing page size to a larger sizeAdrian Johnson1-0/+6
https://bugs.freedesktop.org/show_bug.cgi?id=24691
2010-11-17PS: fix embedding of grayscale jpegsKoji Otani1-2/+3
https://bugs.freedesktop.org/show_bug.cgi?id=31632
2010-10-21Other backends: Set round_glyph_positions to OFFUli Schlachter1-0/+1
This sets CAIRO_ROUND_GLYPH_POS_OFF in all surface backends that didn't use CAIRO_ROUND_GLYPH_POS_ON. Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-15PS: Remove radial gradient fallbackAdrian Johnson1-17/+2
when one circle not inside the other. Pixman now follows the PDF specification.
2010-10-15PS: Remove redundant codeAdrian Johnson1-3/+0
The test for zero stops is now in gstate.
2010-10-06PS: Allow %%BoundingBox and %%PageBoundingBox to be overriden using DSC commentsAdrian Johnson1-11/+27
2010-10-02Don't embed cmap in TrueType fonts embedded in PostScriptAdrian Johnson1-1/+1
it doesn't print on a LaserJet 4050
2010-10-01PS: Enable support for latin subsetsAdrian Johnson1-8/+24
Make PS TrueType embedding use the winansi glyph mapping for latin subsets. Enable use of latin subsets in PS.
2010-08-26subsurface: Make CAIRO_SURFACE_TYPE_SUBSURFACE publicBenjamin Otte1-2/+2
2010-07-10Convert mime data length to use unsigned longChris Wilson1-1/+1
What we want to use is size_t, but we don't want the implied POSIX dependency. However, POSIX does say that size_t is an unsigned integer that is no longer than a long, so it would appear safe to use an unsigned long as a replacement. Safer at least than unsigned int.
2010-07-08doc: Move tmpl/ docs to inline docsBenjamin Otte1-0/+17
I did this manually so I could review the docs at the same time. If anyone finds typos or other mistakes I did, please complain to me (or better: fix them).
2010-07-05ps: Allow specifying if errors on extract_surface should be setBenjamin Otte1-17/+22
Getters should not set errors on passed in input. So we don't. Caught by api-special-cases test