summaryrefslogtreecommitdiff
path: root/base/gxchar.c
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2021-06-14 12:54:00 +0100
committerRobin Watts <Robin.Watts@artifex.com>2021-06-15 15:59:25 +0100
commitb08ddcae269aa0804909fc80fc671519e7d8ff75 (patch)
tree4ec08c9dba51d2ef225e6a34fe2897c733db5331 /base/gxchar.c
parent7e0bd07c6a9b7435a3fa89ea4fdd767b8836f0d6 (diff)
downloadghostpdl-b08ddcae269aa0804909fc80fc671519e7d8ff75.tar.gz
Rejig text_begin dev_proc.
In this commit we remove several parameters to the text_begin device procedure, because they are implied. Firstly, we remove pdcolor, and just use the device color from the current color in the graphics state (pgs->color[0]). This is actually what the code did anyway (in that it was assumed that pdcolor, if it was non-NULL was a pointer to this). Similarly, we remove the path param, as (if used) this is always the same as pgs->path. Finally, we remove the memory param as this is (almost always) the same as pgs->memory (and in cases where it isn't, tests indicate that it could be). This has knock on effects for the text enumerator structure.
Diffstat (limited to 'base/gxchar.c')
-rw-r--r--base/gxchar.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/base/gxchar.c b/base/gxchar.c
index 2332b70a2..7704c91b7 100644
--- a/base/gxchar.c
+++ b/base/gxchar.c
@@ -120,21 +120,21 @@ static const gs_text_enum_procs_t default_text_procs = {
int
gx_default_text_begin(gx_device * dev, gs_gstate * pgs1,
const gs_text_params_t * text, gs_font * font,
- gx_path * path, const gx_device_color * pdcolor,
const gx_clip_path * pcpath,
- gs_memory_t * mem, gs_text_enum_t ** ppte)
+ gs_text_enum_t ** ppte)
{
uint operation = text->operation;
bool propagate_charpath = (operation & TEXT_DO_DRAW) != 0;
int code;
gs_gstate *pgs = (gs_gstate *)pgs1;
gs_show_enum *penum;
+ gs_memory_t * mem = pgs->memory;
penum = gs_show_enum_alloc(mem, pgs, "gx_default_text_begin");
if (!penum)
return_error(gs_error_VMerror);
code = gs_text_enum_init((gs_text_enum_t *)penum, &default_text_procs,
- dev, pgs, text, font, path, pdcolor, pcpath, mem);
+ dev, pgs, text, font, pcpath, mem);
if (code < 0) {
gs_free_object(mem, penum, "gx_default_text_begin");
return code;
@@ -210,7 +210,7 @@ gs_text_count_chars(gs_gstate * pgs, gs_text_params_t *text, gs_memory_t * mem)
code = gs_text_enum_init(&tenum, &default_text_procs,
NULL, NULL, text, pgs->root_font,
- NULL, NULL, NULL, mem);
+ NULL, mem);
if (code < 0)
return code;
while ((code = (*next_proc)(&tenum, &tchr, &tglyph)) != 2) {