summaryrefslogtreecommitdiff
path: root/src/cairo-win32-printing-surface.c
AgeCommit message (Collapse)AuthorFilesLines
2008-05-28One more remaining_glyphs compile fixBehdad Esfahbod1-1/+2
2008-05-23[cairo-xlib] Fix show_glyphs when failing to upload a glyphBehdad Esfahbod1-1/+2
Originally reported here: http://lists.cairographics.org/archives/cairo/2008-May/014032.html and analyized later in the thread. Change (font and surface) backend show_glyphs() API to take a int *remaining_glyphs argument. It's used to communicate to the caller, by way of setting remaining_glyphs and returning INT_STATUS_UNSUPPORTED, that some of the glyphs were shown but not the others. The xlib backend now correctly uses this to handle failure to upload a glyph to the server. So the large-font test passes now. An alternative approach could be to add some public value for glyphs indices that are not shown. -1 perhaps (the xlib backend already uses that value internally). Then instead of remaining_glyphs, a backend could simply set glyph indices of glyphs shown to that -1 value.
2008-05-09[cairo-paginated-surface] Clean up reference counting messBehdad Esfahbod1-5/+11
Previously the paginated constructor didn't reference the target surface, but simply assume ownership of the reference, and then unref it when shutting down. The callers to paginated constructor then, where just give away their reference to paginated and not unref the reference they were holding. While this works correctly, it's against the usual idioms that everyone is responsible for the reference they are holding, and should get their own reference if they need to keep an object alive. Fix it all.
2008-05-04Make win32-printing surface work with bitmap fontsAdrian Johnson1-0/+14
The win32 printing surface has the same problem with bitmap fonts as it does with Type 1 fonts. ie ExtTextOutW() with glyph indices works for a display DC but not a printer DC. Fix this by forcing fallback for bitmap fonts.
2008-05-04Fix win32-printing show_glyphs analysis for Type 1 fontsAdrian Johnson1-0/+1
The analysis code needs to include the Type 1 font check that was previously adding the the rendering code.
2008-04-18Add "Since: 1.6" to win32 printing surfaceAdrian Johnson1-0/+2
2008-04-13win32: Fix broken printing of type1 fontsAdrian Johnson1-0/+1
ExtTextOut() does not work with Type 1 font glyph indices when printing. The same code works fine when dst->dc is a display. It appears that ExtTextOut expects unicode character values when using Type 1 fonts and a printer DC. Fix this by making Type 1 fonts in the win32-printing surface use the fallback path for non Windows fonts. ie the glyphs will be emitted as filled paths.
2008-03-26Use floating-point offsets for color stopsCarl Worth1-1/+1
Previously we were using the cairo_fixed_t type which meant we've historically only been using 16 bits of precision for these offsets, and recently only 8 bits. Meanwhile, all manipulatons of offsets have been in floating-point anyway, so we might as well store them that way. This change also prevents a rendering regression introduced with the 24.8->16.16 change betwen snapshots 1.5.10 and 1.5.12 . This change affected gradient-rendering details for the clip-operator and operator-source tests, so the corresponding reference images are updated here.
2008-03-25Win32-Printing: Fix fallback resolution when DC ctm is not identityAdrian Johnson1-5/+14
And also move the _cairo_surface_set_resolution() into _cairo_win32_printing_surface_start_page as the DC ctm may be changed between pages. This bug was found in Inkscape now that they are using the cairo win32-printing surface for printing on Windows.
2008-03-10win32-printing: Don't scale the miter limitAdrian Johnson1-1/+1
since the miter is a ratio it should not be scaled like the other stroke parameters when the user ctm is scaled.
2008-02-15Win32-printing: Fix meta surface patternsAdrian Johnson1-12/+16
Ensure the win32-printing surface has the same fixes for meta surface patterns with more than one level of push/pop group that PS/PDF received in 060f384310e887f7f431a98e847b8a36fc303a0c
2008-01-24[win32] Print non-black/white text correctly in show_glyphsVladimir Vukicevic1-3/+3
2008-01-24[win32] Better tracking of initial clipVladimir Vukicevic1-42/+27
There were a few corner cases that the win32 surface was failing at when there was an initial clip set; the win32-printing surface had more serious problems when painting meta surface patterns. This cleans up the initial DC clip tracking for both surfaces.
2008-01-18win32-printing: define GRADIENT_FILL_RECT_H bug #14107Adrian Johnson1-0/+4
Older versions of mingw do not define this.
2008-01-16[cairo-surface] Introduce _cairo_surface_create_in_error().Chris Wilson1-7/+3
Unexport all the static error surfaces and use a function to select the appropriate error surface for the status.
2008-01-11win32-printing: Do not clip and paint with an empty pathAdrian Johnson1-2/+6
For non solid patterns _fill and _show_glyphs sets a clip path then paints the pattern. Previously if the path is empty SelectClipPath did not set clip. This was probably the cause of bug 13657 where the entire page was black. Fix this by not painting anything if the path is empty.
2008-01-11win32-printing: use fill instead of clip for non win32 fontsAdrian Johnson1-2/+12
Non Windows fonts are drawn by getting the outline path, setting this is the clip path, and painting the source pattern. For solid colors this can avoid the clip and just do a fill.
2007-11-09[win32-printing] bail out early if we don't have anything to do in paint_surfVladimir Vukicevic1-0/+5
2007-11-09[win32] Skip doing some work if we can't call StretchDIBitsVladimir Vukicevic1-0/+6
2007-10-21win32-printing: remove unused codeAdrian Johnson1-17/+0
2007-10-21win32-printing: fix typo in commentAdrian Johnson1-1/+1
2007-10-21win32-printing: fix dash-caps-joins test failureAdrian Johnson1-5/+6
2007-10-21win32-printing: Use the surface ctm in show_glyphsAdrian Johnson1-0/+14
show_glyphs needs to scale the font by the current CTM.
2007-10-21win32-printing: fix stroke rounding problemsAdrian Johnson1-6/+29
The win32 CTM is changed to user space to set the stroke parameters. As win32 uses integers for stroke parameters this will cause rounding problems depending on the CTM used. This is fixed by factoring out a scale from the user space CTM so that xx, xy, yx, and yy in the CTM are all < 1. This preserves the shape of the transformation while ensuring that the CTM does not cause rounding problems. The stroke parameters are multiplied by the scale value.
2007-10-21win32-printing: fix rounding problems when using pattern matrixAdrian Johnson1-31/+136
When using meta surface patterns, the win32 CTM is changed to the inverted pattern matrix then the meta surface is replayed to the surface. The problem with this is that win32 uses integer coordinates for GDI functions. A pattern matrix that scale the CTM up will cause rounding errors in the position of each path in the pattern. This is fixed by always keeping the win32 CTM set to the identity matrix. The CTM is stored in the surface and all coordinates are transformed by the CTM before calling GDI functions.
2007-10-21win32-printing: add meta surface pattern supportAdrian Johnson1-52/+199
2007-10-21win32-printing: check if images are opaqueAdrian Johnson1-0/+57
Don't use fallback for argb32 images with all alpha == 255.
2007-10-21win32-printing: Add missing struct initializersAdrian Johnson1-1/+3
2007-10-13PS/Win32-printing: remove redundant checks from _analyze_operationAdrian Johnson1-6/+0
The check for supported operators is performed earlier in this functions so these two checks in not required.
2007-10-10[win32] mask win32 printing vertex colors with 0xff00 per docsVladimir Vukicevic1-4/+7
The range for the vertex color structures is 0x0000 .. 0xff00; I think that this is an error in the docs, but strip out the low bits just in case.
2007-10-10Fix win32 printing surface copyright noticeVladimir Vukicevic1-2/+2
Bad copy-and-paste of license.
2007-10-10[win32] Clean up compiler warnings.Chris Wilson1-9/+17
Fix up a few instances of unused status returns.
2007-10-09[win32] remove ignore_operators flag from win32 printing surfaceVladimir Vukicevic1-12/+4
Remove the ignore_operators fallback-avoiding workaround; if apps want that same behaviour, they'll have to implement it themselves by taking care when calling cairo_set_operator().
2007-09-18[win32] Add win32 printing surfaceVladimir Vukicevic1-0/+1220
Add win32 surface intended for use with printer DCs; GDI will be used as much as possible, and the surface will be a paginated surface that supports fine-grained fallback. (Original work from Adrian Johnson; additional fixes by me.)