summaryrefslogtreecommitdiff
path: root/pcl/pcpage.h
blob: 64dff84fb646c487618fc7bd71ba98fc0d1d01a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/* Portions Copyright (C) 2001 artofcode LLC.
   Portions Copyright (C) 1996, 2001 Artifex Software Inc.
   Portions Copyright (C) 1988, 2000 Aladdin Enterprises.
   This software is based in part on the work of the Independent JPEG Group.
   All Rights Reserved.

   This software is distributed under license and may not be copied, modified
   or distributed except as expressly authorized under the terms of that
   license.  Refer to licensing information at http://www.artifex.com/ or
   contact Artifex Software, Inc., 101 Lucas Valley Road #110,
   San Rafael, CA  94903, (415)492-9861, for further information. */
/*$Id$ */

/* pcpage.c - PCL5 page and transformation control interface */

#ifndef pcpage_INCLUDED
#define pcpage_INCLUDED

#include "pcstate.h"
#include "pcommand.h"

/* set the page output procedure */
void pcl_set_end_page(int (*procp)(pcl_state_t *, int, int));

/*
 * End a page, either unconditionally or only if there are marks on it.
 * Return 1 if the page was actually printed and erased.
 */
typedef enum {
    pcl_print_always,
    pcl_print_if_marked
} pcl_print_condition_t;

int pcl_end_page(
    pcl_state_t *           pcs,
    pcl_print_condition_t   condition
);

void new_logical_page(
    pcl_state_t *               pcs,
    int                         lp_orient,
    const pcl_paper_size_t *    psize,
    bool                        reset_initial,
    bool                        for_passthrough
);

 int
pcl_getdevice_initial_matrix(
     pcl_state_t *       pcs,
     gs_matrix *         mat
);

bool pcl_page_marked(
    pcl_state_t *           pcs
);

void pcl_mark_page_for_path(pcl_state_t *pcs);
void pcl_mark_page_for_current_pos(pcl_state_t *pcs);
int new_logical_page_for_passthrough_snippet(pcl_state_t *pcs, int orient, int tag);
pcl_paper_size_t *pcl_get_default_paper(pcl_state_t *pcs);
int pcl_new_logical_page_for_passthrough(pcl_state_t *pcs, int orient, gs_point *pdims);

#define pcl_end_page_always(pcs)    pcl_end_page((pcs), pcl_print_always)
#define pcl_end_page_if_marked(pcs) pcl_end_page((pcs), pcl_print_if_marked)

extern  const pcl_init_t    pcpage_init;

#endif			/* pcpage_INCLUDED */