summaryrefslogtreecommitdiff
path: root/gs/src/gdevbbox.h
diff options
context:
space:
mode:
authorHenry Stiles <henry.stiles@artifex.com>1998-08-08 05:57:31 +0000
committerHenry Stiles <henry.stiles@artifex.com>1998-08-08 05:57:31 +0000
commitb8cb922d73b866149ca3da2288f1edcf959c45c9 (patch)
treec1cab95009d6c0aca63dfb810a5e0ff5858fc2e1 /gs/src/gdevbbox.h
parent049831bbe312e8a7ba47fa1e3b583a21052464de (diff)
downloadghostpdl-b8cb922d73b866149ca3da2288f1edcf959c45c9.tar.gz
This commit was generated by cvs2svn to compensate for changes in r274,
which included commits to RCS files with non-trunk default branches. git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@275 06663e23-700e-0410-b217-a244a6096597
Diffstat (limited to 'gs/src/gdevbbox.h')
-rw-r--r--gs/src/gdevbbox.h87
1 files changed, 46 insertions, 41 deletions
diff --git a/gs/src/gdevbbox.h b/gs/src/gdevbbox.h
index 3b6d1bf44..23a06d44e 100644
--- a/gs/src/gdevbbox.h
+++ b/gs/src/gdevbbox.h
@@ -1,25 +1,27 @@
/* Copyright (C) 1996, 1997, 1998 Aladdin Enterprises. All rights reserved.
-
- This file is part of Aladdin Ghostscript.
-
- Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author
- or distributor accepts any responsibility for the consequences of using it,
- or for whether it serves any particular purpose or works at all, unless he
- or she says so in writing. Refer to the Aladdin Ghostscript Free Public
- License (the "License") for full details.
-
- Every copy of Aladdin Ghostscript must include a copy of the License,
- normally in a plain ASCII text file named PUBLIC. The License grants you
- the right to copy, modify and redistribute Aladdin Ghostscript, but only
- under certain conditions described in the License. Among other things, the
- License requires that the copyright notice and this notice be preserved on
- all copies.
-*/
-/*Id: gdevbbox.h */
-/* Interface to bounding box device */
+ This file is part of Aladdin Ghostscript.
+
+ Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author
+ or distributor accepts any responsibility for the consequences of using it,
+ or for whether it serves any particular purpose or works at all, unless he
+ or she says so in writing. Refer to the Aladdin Ghostscript Free Public
+ License (the "License") for full details.
+
+ Every copy of Aladdin Ghostscript must include a copy of the License,
+ normally in a plain ASCII text file named PUBLIC. The License grants you
+ the right to copy, modify and redistribute Aladdin Ghostscript, but only
+ under certain conditions described in the License. Among other things, the
+ License requires that the copyright notice and this notice be preserved on
+ all copies.
+ */
+
+/*Id: gdevbbox.h */
/* Requires gxdevice.h */
+#ifndef gdevbbox_INCLUDED
+# define gdevbbox_INCLUDED
+
/*
* This device keeps track of the per-page bounding box, and also optionally
* forwards all drawing commands to a target. It can be used either as a
@@ -34,34 +36,34 @@
* The other way to use a bounding box device is from C code as a component
* in a device pipeline. To set up a bounding box device that doesn't do
* any drawing:
- * gx_device_bbox *bdev =
- * gs_alloc_struct_immovable(some_memory,
- * gx_device_bbox, &st_device_bbox,
- * "some identifying string for debugging");
- * gx_device_bbox_init(bdev, NULL);
+ * gx_device_bbox *bdev =
+ * gs_alloc_struct_immovable(some_memory,
+ * gx_device_bbox, &st_device_bbox,
+ * "some identifying string for debugging");
+ * gx_device_bbox_init(bdev, NULL);
* Non-drawing bounding box devices have an "infinite" page size.
*
* To set up a bounding box device that draws to another device tdev:
- * gx_device_bbox *bdev =
- * gs_alloc_struct_immovable(some_memory,
- * gx_device_bbox, &st_device_bbox,
- * "some identifying string for debugging");
- * gx_device_bbox_init(bdev, tdev);
+ * gx_device_bbox *bdev =
+ * gs_alloc_struct_immovable(some_memory,
+ * gx_device_bbox, &st_device_bbox,
+ * "some identifying string for debugging");
+ * gx_device_bbox_init(bdev, tdev);
* Bounding box devices that draw to a real device appear to have the
* same page size as that device.
*
* To intercept the end-of-page to call a routine eop of your own, after
* setting up the device:
- * dev_proc_output_page(eop); -- declare a prototype for eop
- * ...
- * set_dev_proc(bdev, output_page, eop);
- * ...
- * int eop(gx_device *dev, int num_copies, int flush)
- * { gs_rect bbox;
- * gx_device_bbox_bbox((gx_device_bbox *)dev, &bbox);
- * << do whatever you want >>
- * return gx_forward_output_page(dev, num_copies, flush);
- * }
+ * dev_proc_output_page(eop); -- declare a prototype for eop
+ * ...
+ * set_dev_proc(bdev, output_page, eop);
+ * ...
+ * int eop(gx_device *dev, int num_copies, int flush)
+ * { gs_rect bbox;
+ * gx_device_bbox_bbox((gx_device_bbox *)dev, &bbox);
+ * << do whatever you want >>
+ * return gx_forward_output_page(dev, num_copies, flush);
+ * }
*/
#define gx_device_bbox_common\
gx_device_forward_common;\
@@ -74,8 +76,9 @@
gx_color_index white
typedef struct gx_device_bbox_s gx_device_bbox;
struct gx_device_bbox_s {
- gx_device_bbox_common;
+ gx_device_bbox_common;
};
+
extern_st(st_device_bbox);
#define public_st_device_bbox() /* in gdevbbox.c */\
gs_public_st_suffix_add1_final(st_device_bbox, gx_device_bbox,\
@@ -83,7 +86,9 @@ extern_st(st_device_bbox);
gx_device_finalize, st_device_forward, box_device)
/* Initialize a bounding box device. */
-void gx_device_bbox_init(P2(gx_device_bbox *dev, gx_device *target));
+void gx_device_bbox_init(P2(gx_device_bbox * dev, gx_device * target));
/* Read back the bounding box in 1/72" units. */
-void gx_device_bbox_bbox(P2(gx_device_bbox *dev, gs_rect *pbbox));
+void gx_device_bbox_bbox(P2(gx_device_bbox * dev, gs_rect * pbbox));
+
+#endif /* gdevbbox_INCLUDED */