Index: draw_ps.h =================================================================== --- draw_ps.h (nonexistent) +++ draw_ps.h (revision 36235) @@ -0,0 +1,21 @@ +typedef struct rnd_ps_s { + FILE *outf; +} rnd_ps_t; + +void rnd_ps_init(rnd_ps_t *pctx, FILE *f); + +void ps_start_file(rnd_ps_t *pctx, const char *swver); +void ps_end_file(rnd_ps_t *pctx); + + +void rnd_ps_draw_rect(rnd_ps_t *pctx, rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); +void rnd_ps_draw_line(rnd_ps_t *pctx, rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); +void rnd_ps_draw_arc(rnd_ps_t *pctx, rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle); +void rnd_ps_fill_circle(rnd_ps_t *pctx, rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius); +void rnd_ps_fill_polygon_offs(rnd_ps_t *pctx, rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy); +void rnd_ps_fill_rect(rnd_ps_t *pctx, rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); + + + + + Index: ps.c =================================================================== --- ps.c (revision 36234) +++ ps.c (revision 36235) @@ -30,6 +30,8 @@ #include "stub_draw.h" #include "../src_plugins/lib_compat_help/media.h" +#include "draw_ps.h" + const char *ps_cookie = "ps HID"; static int ps_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform); @@ -466,7 +468,7 @@ fprintf(f, "%%%%EndComments\n\n"); } -static void ps_end_file(rnd_ps_t *pctx) +void ps_end_file(rnd_ps_t *pctx) { FILE *f = pctx->outf; Index: ps.h =================================================================== --- ps.h (revision 36234) +++ ps.h (revision 36235) @@ -8,9 +8,3 @@ extern void hid_eps_uninit(); extern const char *ps_cookie; -/* will be the low level */ -typedef struct rnd_ps_s { - FILE *outf; -} rnd_ps_t; - -extern void ps_start_file(rnd_ps_t *, const char *swver);