00001 /*********************************************************************** 00002 * * 00003 * $Id: hpgsdevices.h 489 2009-02-11 14:10:30Z softadm $ 00004 * * 00005 * hpgs - HPGl Script, a hpgl/2 interpreter, which uses a Postscript * 00006 * API for rendering a scene and thus renders to a variety of * 00007 * devices and fileformats. * 00008 * * 00009 * (C) 2004-2009 ev-i Informationstechnologie GmbH http://www.ev-i.at * 00010 * * 00011 * Author: Wolfgang Glas * 00012 * * 00013 * hpgs is free software; you can redistribute it and/or * 00014 * modify it under the terms of the GNU Lesser General Public * 00015 * License as published by the Free Software Foundation; either * 00016 * version 2.1 of the License, or (at your option) any later version. * 00017 * * 00018 * hpgs is distributed in the hope that it will be useful, * 00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00021 * Lesser General Public License for more details. * 00022 * * 00023 * You should have received a copy of the GNU Lesser General Public * 00024 * License along with this library; if not, write to the * 00025 * Free Software Foundation, Inc., 59 Temple Place, Suite 330, * 00026 * Boston, MA 02111-1307 USA * 00027 * * 00028 *********************************************************************** 00029 * * 00030 * The private interfaces for the basic devices * 00031 * * 00032 ***********************************************************************/ 00033 00034 #ifndef __HPGS_DEVICES_H 00035 #define __HPGS_DEVICES_H 00036 00037 #include<hpgs.h> 00038 00039 #ifdef __cplusplus 00040 extern "C" { 00041 #endif 00042 00055 #define HPGS_PLOTSIZE_MAX_CLIP_DEPTH 16 00056 00062 struct hpgs_plotsize_device_st { 00063 hpgs_device inherited; 00064 00065 hpgs_bool ignore_ps; 00066 int clip_depth; 00067 00068 hpgs_point moveto; 00069 int deferred_moveto; 00070 00071 hpgs_bool do_linewidth; 00072 double linewidth; 00073 00074 hpgs_bbox clip_bbs[HPGS_PLOTSIZE_MAX_CLIP_DEPTH]; 00076 hpgs_bbox path_bb; 00077 hpgs_bbox page_bb; 00078 hpgs_bbox global_bb; 00080 00083 hpgs_bbox *page_bbs; 00084 int n_page_bbs; 00085 int page_bbs_alloc_size; 00087 }; 00088 00089 typedef struct hpgs_ps_media_size_st hpgs_ps_media_size; 00090 00095 struct hpgs_ps_media_size_st 00096 { 00097 int width; 00098 int height; 00099 00100 const char *name; 00101 size_t usage; 00102 00103 size_t hash; 00104 }; 00105 00111 struct hpgs_eps_device_st { 00112 hpgs_device inherited; 00113 00114 hpgs_bbox doc_bb; 00117 hpgs_bbox page_bb; 00120 int n_pages; 00123 char *filename; 00124 00125 hpgs_ostream *out; 00126 hpgs_bool page_setup; 00127 00132 hpgs_ps_media_size *media_sizes; 00133 int n_media_sizes; 00134 int media_sizes_alloc_size; 00137 hpgs_xrop3_func_t rop3; 00138 hpgs_palette_color pattern_color; 00139 00140 hpgs_color color; 00141 }; 00142 00143 HPGS_INTERNAL_API void hpgs_cleanup_plugin_devices(); 00144 /* end of group device */ 00146 00147 #ifdef __cplusplus 00148 } // end of extern "C" 00149 #endif 00150 00151 #endif /* ! __HPGS_DEVICES_H */