1
/* gtkplotpc - gtkplot print context - a renderer for printing functions
2
* Copyright 1999-2001 Adrian E. Feiguin <feiguin@ifir.edu.ar>
4
* This library is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Library General Public
6
* License as published by the Free Software Foundation; either
7
* version 2 of the License, or (at your option) any later version.
9
* This library is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Library General Public License for more details.
14
* You should have received a copy of the GNU Library General Public
15
* License along with this library; if not, write to the
16
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17
* Boston, MA 02111-1307, USA.
20
#ifndef __GTK_PLOT_PC_H__
21
#define __GTK_PLOT_PC_H__
24
#include "gtkpsfont.h"
28
#endif /* __cplusplus */
31
#define GTK_PLOT_PC(obj) GTK_CHECK_CAST (obj, gtk_plot_pc_get_type (), GtkPlotPC)
32
#define GTK_TYPE_PLOT_PC (gtk_plot_pc_get_type ())
34
#define GTK_PLOT_PC_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_plot_pc_get_type(), GtkPlotPCClass)
35
#define GTK_IS_PLOT_PC(obj) GTK_CHECK_TYPE (obj, gtk_plot_pc_get_type ())
48
#define GTK_PLOT_LETTER_W 612 /* Width and Height in ps points */
49
#define GTK_PLOT_LETTER_H 792
51
#define GTK_PLOT_LEGAL_W 612
52
#define GTK_PLOT_LEGAL_H 1008
54
#define GTK_PLOT_A4_W 595
55
#define GTK_PLOT_A4_H 842
57
#define GTK_PLOT_EXECUTIVE_W 540
58
#define GTK_PLOT_EXECUTIVE_H 720
61
/* Page orientation */
65
} GtkPlotPageOrientation;
76
typedef struct _GtkPlotPC GtkPlotPC;
77
typedef struct _GtkPlotPCClass GtkPlotPCClass;
78
typedef struct _GtkPlotPoint GtkPlotPoint;
89
gdouble width, height; /* viewport */
96
struct _GtkPlotPCClass
98
GtkObjectClass parent_class;
100
gboolean (* init) (GtkPlotPC *pc);
102
void (* leave) (GtkPlotPC *pc);
104
void (* set_viewport) (GtkPlotPC *pc,
105
gdouble w, gdouble h);
107
void (* gsave) (GtkPlotPC *pc);
109
void (* grestore) (GtkPlotPC *pc);
111
void (* clip) (GtkPlotPC *pc,
112
const GdkRectangle *area);
113
void (* clip_mask) (GtkPlotPC *pc,
116
const GdkBitmap *mask);
118
void (* set_color) (GtkPlotPC *pc,
119
const GdkColor *color);
121
void (* set_lineattr) (GtkPlotPC *pc,
123
GdkLineStyle line_style,
124
GdkCapStyle cap_style,
125
GdkJoinStyle join_style);
127
void (* set_dash) (GtkPlotPC *pc,
132
void (* draw_point) (GtkPlotPC *pc,
133
gdouble x, gdouble y);
135
void (* draw_line) (GtkPlotPC *pc,
136
gdouble x1, gdouble y1,
137
gdouble x2, gdouble y2);
139
void (* draw_lines) (GtkPlotPC *pc,
140
GtkPlotPoint *points,
143
void (* draw_rectangle) (GtkPlotPC *pc,
145
gdouble x, gdouble y,
149
void (* draw_polygon) (GtkPlotPC *pc,
151
GtkPlotPoint *points,
154
void (* draw_circle) (GtkPlotPC *pc,
156
gdouble x, gdouble y,
159
void (* draw_ellipse) (GtkPlotPC *pc,
161
gdouble x, gdouble y,
165
void (* set_font) (GtkPlotPC *pc,
169
void (* draw_string) (GtkPlotPC *pc,
174
gboolean transparent,
181
GtkJustification just,
184
void (* draw_pixmap) (GtkPlotPC *pc,
187
gint xsrc, gint ysrc,
188
gint xdest, gint ydest,
195
GtkType gtk_plot_pc_get_type (void);
196
GtkObject *gtk_plot_pc_new (void);
198
gboolean gtk_plot_pc_init (GtkPlotPC *pc);
200
void gtk_plot_pc_leave (GtkPlotPC *pc);
201
void gtk_plot_pc_set_viewport (GtkPlotPC *pc,
202
gdouble w, gdouble h);
204
void gtk_plot_pc_gsave (GtkPlotPC *pc);
206
void gtk_plot_pc_grestore (GtkPlotPC *pc);
208
void gtk_plot_pc_clip (GtkPlotPC *pc,
210
void gtk_plot_pc_clip_mask (GtkPlotPC *pc,
215
void gtk_plot_pc_set_color (GtkPlotPC *pc,
218
void gtk_plot_pc_set_lineattr (GtkPlotPC *pc,
220
GdkLineStyle line_style,
221
GdkCapStyle cap_style,
222
GdkJoinStyle join_style);
224
void gtk_plot_pc_set_dash (GtkPlotPC *pc,
229
void gtk_plot_pc_draw_point (GtkPlotPC *pc,
230
gdouble x, gdouble y);
232
void gtk_plot_pc_draw_line (GtkPlotPC *pc,
233
gdouble x1, gdouble y1,
234
gdouble x2, gdouble y2);
236
void gtk_plot_pc_draw_lines (GtkPlotPC *pc,
237
GtkPlotPoint *points,
240
void gtk_plot_pc_draw_rectangle (GtkPlotPC *pc,
242
gdouble x, gdouble y,
246
void gtk_plot_pc_draw_polygon (GtkPlotPC *pc,
248
GtkPlotPoint *points,
251
void gtk_plot_pc_draw_ellipse (GtkPlotPC *pc,
253
gdouble x, gdouble y,
257
void gtk_plot_pc_draw_circle (GtkPlotPC *pc,
259
gdouble x, gdouble y,
262
void gtk_plot_pc_set_font (GtkPlotPC *pc,
266
void gtk_plot_pc_draw_string (GtkPlotPC *pc,
271
gboolean transparent,
278
GtkJustification just,
281
void gtk_plot_pc_draw_pixmap (GtkPlotPC *pc,
284
gint xsrc, gint ysrc,
285
gint xdest, gint ydest,
293
#endif /* __cplusplus */
296
#endif /* __GTK_PLOT_PC_H__ */