"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "psi/zupath.c" between
ghostscript-9.26.tar.xz and ghostscript-9.27.tar.xz

About: Ghostscript is an interpreter and rendering engine for the PostScript language and for PDF (GPL release).

zupath.c  (ghostscript-9.26.tar.xz):zupath.c  (ghostscript-9.27.tar.xz)
/* Copyright (C) 2001-2018 Artifex Software, Inc. /* Copyright (C) 2001-2019 Artifex Software, Inc.
All Rights Reserved. All Rights Reserved.
This software is provided AS-IS with no warranty, either express or This software is provided AS-IS with no warranty, either express or
implied. implied.
This software is distributed under license and may not be copied, This software is distributed under license and may not be copied,
modified or distributed except as expressly authorized under the terms modified or distributed except as expressly authorized under the terms
of the license contained in the file LICENSE in this distribution. of the license contained in the file LICENSE in this distribution.
Refer to licensing information at http://www.artifex.com or contact Refer to licensing information at http://www.artifex.com or contact
skipping to change at line 456 skipping to change at line 456
if ((code = gs_setmatrix(igs, &saved_matrix)) < 0) { if ((code = gs_setmatrix(igs, &saved_matrix)) < 0) {
gx_path_assign_free(igs->path, &save); gx_path_assign_free(igs->path, &save);
return code; return code;
} }
} }
gx_path_free(&save, "ustrokepath"); gx_path_free(&save, "ustrokepath");
pop(npop); pop(npop);
return 0; return 0;
} }
/* <with_ucache> upath <userpath> */
/* We do all the work in a procedure that is also used to construct */
/* the UnpaintedPath user path for ImageType 2 images. */
int make_upath(i_ctx_t *i_ctx_p, ref *rupath, gs_gstate *pgs, gx_path *ppath,
bool with_ucache);
static int
zupath(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
check_type(*op, t_boolean);
return make_upath(i_ctx_p, op, igs, igs->path, op->value.boolval);
}
/* Compute the path length for user path purposes. */ /* Compute the path length for user path purposes. */
static int static int
path_length_for_upath(const gx_path *ppath) path_length_for_upath(const gx_path *ppath)
{ {
gs_path_enum penum; gs_path_enum penum;
int op, size = 0; int op, size = 0;
gs_fixed_point pts[3]; gs_fixed_point pts[3];
gx_path_enum_init(&penum, ppath); gx_path_enum_init(&penum, ppath);
while ((op = gx_path_enum_next(&penum, pts)) != 0) { while ((op = gx_path_enum_next(&penum, pts)) != 0) {
skipping to change at line 498 skipping to change at line 484
case gs_pe_closepath: case gs_pe_closepath:
size += 1; size += 1;
continue; continue;
default: default:
return_error(gs_error_unregistered); return_error(gs_error_unregistered);
} }
} }
return size; return size;
} }
int static int
make_upath(i_ctx_t *i_ctx_p, ref *rupath, gs_gstate *pgs, gx_path *ppath, make_upath(i_ctx_t *i_ctx_p, ref *rupath, gs_gstate *pgs, gx_path *ppath,
bool with_ucache) bool with_ucache)
{ {
int size = (with_ucache ? 6 : 5); int size = (with_ucache ? 6 : 5);
gs_path_enum penum; gs_path_enum penum;
gs_rect bbox; gs_rect bbox;
int op; int op;
ref *next; ref *next;
int code; int code;
skipping to change at line 597 skipping to change at line 583
} }
if ((code = name_enter_string(pgs->memory, opstr, next)) < 0) if ((code = name_enter_string(pgs->memory, opstr, next)) < 0)
return code; return code;
r_set_attrs(next, a_executable); r_set_attrs(next, a_executable);
++next; ++next;
} }
} }
return 0; return 0;
} }
/* <with_ucache> upath <userpath> */
static int
zupath(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
check_type(*op, t_boolean);
return make_upath(i_ctx_p, op, igs, igs->path, op->value.boolval);
}
static int static int
zgetpath(i_ctx_t *i_ctx_p) zgetpath(i_ctx_t *i_ctx_p)
{ {
os_ptr op = osp; os_ptr op = osp;
int i, code, path_size, leaf_count; int i, code, path_size, leaf_count;
ref *main_ref, *operators[5]; ref *main_ref, *operators[5];
push(1); push(1);
path_size = code = path_length_for_upath(igs->path); path_size = code = path_length_for_upath(igs->path);
if (code < 0) if (code < 0)
skipping to change at line 895 skipping to change at line 891
{"2inufill", zinufill}, {"2inufill", zinufill},
{"2inustroke", zinustroke}, {"2inustroke", zinustroke},
/* User paths */ /* User paths */
{"1uappend", zuappend}, {"1uappend", zuappend},
{"0ucache", zucache}, {"0ucache", zucache},
{"1ueofill", zueofill}, {"1ueofill", zueofill},
{"1ufill", zufill}, {"1ufill", zufill},
{"1upath", zupath}, {"1upath", zupath},
{"1ustroke", zustroke}, {"1ustroke", zustroke},
{"1ustrokepath", zustrokepath}, {"1ustrokepath", zustrokepath},
/* Path access for PDF */ op_def_end(0)
};
const op_def zupath_op_defs[] =
{
/* Path access for PDF */
{"0.getpath", zgetpath}, {"0.getpath", zgetpath},
op_def_end(0) op_def_end(0)
}; };
 End of changes. 5 change blocks. 
17 lines changed or deleted 18 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)