| 1 |
/* Copyright (C) 2018-2024 Artifex Software, Inc. |
| 2 |
All Rights Reserved. |
| 3 |
|
| 4 |
This software is provided AS-IS with no warranty, either express or |
| 5 |
implied. |
| 6 |
|
| 7 |
This software is distributed under license and may not be copied, |
| 8 |
modified or distributed except as expressly authorized under the terms |
| 9 |
of the license contained in the file LICENSE in this distribution. |
| 10 |
|
| 11 |
Refer to licensing information at http://www.artifex.com or contact |
| 12 |
Artifex Software, Inc., 39 Mesa Street, Suite 108A, San Francisco, |
| 13 |
CA 94129, USA, for further information. |
| 14 |
*/ |
| 15 |
|
| 16 |
/* Graphics state operations for the PDF interpreter */ |
| 17 |
|
| 18 |
#ifndef PDF_GSTATE_OPERATORS |
| 19 |
#define PDF_GSTATE_OPERATORS |
| 20 |
|
| 21 |
/* Interpreter graphics state things (see igstate.h/int_gstate) */ |
| 22 |
typedef struct pdfi_int_gstate_s { |
| 23 |
pdf_context *ctx; |
| 24 |
pdf_dict *SMask; /* PDF only, null | dictionary | true */ |
| 25 |
gs_gstate *GroupGState; /* gstate associated with the SMask */ |
| 26 |
pdf_font *current_font; /* This is the pdfi font pointed at by the "client_data" pointer in the gs_font in the gs_gstate */ |
| 27 |
gs_memory_t *memory; |
| 28 |
} pdfi_int_gstate; |
| 29 |
|
| 30 |
int pdfi_gstate_set_client(pdf_context *ctx, gs_gstate *pgs); |
| 31 |
void pdfi_gstate_smask_install(pdfi_int_gstate *igs, gs_memory_t *memory, pdf_dict *SMask, gs_gstate *gstate); |
| 32 |
void pdfi_gstate_smask_free(pdfi_int_gstate *igs); |
| 33 |
|
| 34 |
int pdfi_get_blend_mode(pdf_context *ctx, pdf_name *name, gs_blend_mode_t *mode); |
| 35 |
|
| 36 |
int pdfi_concat(pdf_context *ctx); |
| 37 |
int pdfi_gsave(pdf_context *ctx); |
| 38 |
int pdfi_grestore(pdf_context *ctx); |
| 39 |
int pdfi_gs_setgstate(gs_gstate * pgs, const gs_gstate * pfrom); |
| 40 |
int pdfi_op_q(pdf_context *ctx); |
| 41 |
int pdfi_op_Q(pdf_context *ctx); |
| 42 |
int pdfi_setlinewidth(pdf_context *ctx); |
| 43 |
int pdfi_setlinejoin(pdf_context *ctx); |
| 44 |
int pdfi_setlinecap(pdf_context *ctx); |
| 45 |
int pdfi_setflat(pdf_context *ctx); |
| 46 |
int pdfi_setdash(pdf_context *ctx); |
| 47 |
int pdfi_setmiterlimit(pdf_context *ctx); |
| 48 |
int pdfi_setgstate(pdf_context *ctx, pdf_dict *stream_dict, pdf_dict *page_dict); |
| 49 |
int pdfi_setdash_impl(pdf_context *ctx, pdf_array *a, double phase_d); |
| 50 |
int pdfi_set_ExtGState(pdf_context *ctx, pdf_dict *stream_dict, pdf_dict *page_dict, pdf_dict *gstate_dict); |
| 51 |
|
| 52 |
int pdfi_free_DefaultQState(pdf_context *ctx); |
| 53 |
int pdfi_set_DefaultQState(pdf_context *ctx, gs_gstate *pgs); |
| 54 |
gs_gstate *pdfi_get_DefaultQState(pdf_context *ctx); |
| 55 |
int pdfi_copy_DefaultQState(pdf_context *ctx, gs_gstate **pgs); |
| 56 |
int pdfi_restore_DefaultQState(pdf_context *ctx, gs_gstate **pgs); |
| 57 |
|
| 58 |
#endif |