Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
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.
|
|
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.
|
|
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.
|
|
The analysis code needs to include the Type 1 font check that was
previously adding the the rendering code.
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
since the miter is a ratio it should not be scaled like the other
stroke parameters when the user ctm is scaled.
|
|
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
|
|
|
|
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.
|
|
Older versions of mingw do not define this.
|
|
Unexport all the static error surfaces and use a function to select
the appropriate error surface for the status.
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
show_glyphs needs to scale the font by the current CTM.
|
|
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.
|
|
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.
|
|
|
|
Don't use fallback for argb32 images with all alpha == 255.
|
|
|
|
The check for supported operators is performed earlier in this
functions so these two checks in not required.
|
|
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.
|
|
Bad copy-and-paste of license.
|
|
Fix up a few instances of unused status returns.
|
|
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().
|
|
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.)
|