win32-printing: use fill instead of clip for non win32 fonts

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.
This commit is contained in:
Adrian Johnson 2008-01-11 22:06:51 +10:30
parent ef56a6fd93
commit 7ef4caaf11

View file

@ -1374,8 +1374,18 @@ _cairo_win32_printing_surface_show_glyphs (void *abstract_surfac
surface->ctm = old_ctm;
surface->has_ctm = old_has_ctm;
if (status == CAIRO_STATUS_SUCCESS) {
SelectClipPath (surface->dc, RGN_AND);
status = _cairo_win32_printing_surface_paint_pattern (surface, source);
if (source->type == CAIRO_PATTERN_TYPE_SOLID) {
status = _cairo_win32_printing_surface_select_solid_brush (surface, source);
if (status)
return status;
SetPolyFillMode (surface->dc, WINDING);
FillPath (surface->dc);
_cairo_win32_printing_surface_done_solid_brush (surface);
} else {
SelectClipPath (surface->dc, RGN_AND);
status = _cairo_win32_printing_surface_paint_pattern (surface, source);
}
}
RestoreDC (surface->dc, -1);