mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-06 01:09:59 +02:00
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:
parent
ef56a6fd93
commit
7ef4caaf11
1 changed files with 12 additions and 2 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue