1
/* Copyright (C) 2001-2006 Artifex Software, Inc.
4
This software is provided AS-IS with no warranty, either express or
7
This software is distributed under license and may not be copied, modified
8
or distributed except as expressly authorized under the terms of that
9
license. Refer to licensing information at http://www.artifex.com/
10
or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134,
11
San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information.
14
/* $Id: gxpaint.c 8250 2007-09-25 13:31:24Z giles $ */
15
/* Graphics-state-aware fill and stroke procedures */
24
static bool caching_an_outline_font(const gs_state * pgs)
26
return pgs->in_cachedevice > 1 &&
28
pgs->font->FontType != ft_user_defined &&
29
pgs->font->FontType != ft_CID_user_defined;
34
gx_fill_path(gx_path * ppath, gx_device_color * pdevc, gs_state * pgs,
35
int rule, fixed adjust_x, fixed adjust_y)
37
gx_device *dev = gs_currentdevice_inline(pgs);
39
int code = gx_effective_clip_path(pgs, &pcpath);
40
gx_fill_params params;
45
params.adjust.x = adjust_x;
46
params.adjust.y = adjust_y;
47
params.flatness = (caching_an_outline_font(pgs) ? 0.0 : pgs->flatness);
48
params.fill_zero_width = (adjust_x | adjust_y) != 0;
49
return (*dev_proc(dev, fill_path))
50
(dev, (const gs_imager_state *)pgs, ppath, ¶ms, pdevc, pcpath);
53
/* Stroke a path for drawing or saving. */
55
gx_stroke_fill(gx_path * ppath, gs_state * pgs)
57
gx_device *dev = gs_currentdevice_inline(pgs);
59
int code = gx_effective_clip_path(pgs, &pcpath);
60
gx_stroke_params params;
64
params.flatness = (caching_an_outline_font(pgs) ? 0.0 : pgs->flatness);
65
return (*dev_proc(dev, stroke_path))
66
(dev, (const gs_imager_state *)pgs, ppath, ¶ms,
67
pgs->dev_color, pcpath);
71
gx_stroke_add(gx_path * ppath, gx_path * to_path,
74
gx_stroke_params params;
76
params.flatness = (caching_an_outline_font(pgs) ? 0.0 : pgs->flatness);
77
return gx_stroke_path_only(ppath, to_path, pgs->device,
78
(const gs_imager_state *)pgs,
83
gx_imager_stroke_add(gx_path *ppath, gx_path *to_path,
84
gx_device *dev, const gs_imager_state *pis)
86
gx_stroke_params params;
88
params.flatness = pis->flatness;
89
return gx_stroke_path_only(ppath, to_path, dev, pis,