X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fcairo-fsm.h;h=e5a22362a10660f640341c142aa9e164f467f37c;hb=6132656980af2e8527e3e83c8418846ef4c478c7;hp=74b43860c8dcd062a0f1efc8048aaeccd180c259;hpb=8ec15713eb9ba3b4bd991172204f8c1f67d30170;p=pspp diff --git a/src/output/cairo-fsm.h b/src/output/cairo-fsm.h index 74b43860c8..e5a22362a1 100644 --- a/src/output/cairo-fsm.h +++ b/src/output/cairo-fsm.h @@ -19,8 +19,6 @@ #include -#ifdef HAVE_CAIRO - #include #include #include "output/table.h" @@ -28,22 +26,21 @@ struct xr_fsm; struct output_item; -enum xr_font_type - { - XR_FONT_PROPORTIONAL, - XR_FONT_FIXED, - XR_N_FONTS - }; +/* The unit used for internal measurements is inch/(72 * XR_POINT). + (Thus, XR_POINT units represent one point.) */ +#define XR_POINT PANGO_SCALE struct xr_fsm_style { int ref_cnt; - int size[TABLE_N_AXES]; /* Page size. */ + int size[TABLE_N_AXES]; /* Page size. */ int min_break[TABLE_N_AXES]; /* Minimum cell size to allow breaking. */ - PangoFontDescription *fonts[XR_N_FONTS]; + PangoFontDescription *font; + struct cell_color fg; bool use_system_colors; - bool transparent; + + int object_spacing; /* Resolution, in units per inch, used for measuring font "points". If this is 72.0, for example, then 1pt = 1 device unit, which is @@ -53,23 +50,26 @@ struct xr_fsm_style double font_resolution; }; struct xr_fsm_style *xr_fsm_style_ref (const struct xr_fsm_style *); +struct xr_fsm_style *xr_fsm_style_unshare (struct xr_fsm_style *); void xr_fsm_style_unref (struct xr_fsm_style *); bool xr_fsm_style_equals (const struct xr_fsm_style *, const struct xr_fsm_style *); -struct xr_fsm *xr_fsm_create (const struct output_item *, - const struct xr_fsm_style *, - cairo_t *); -void xr_fsm_destroy (struct xr_fsm *); - +/* Interface used for rendering output items in a single on-screen region. */ +struct xr_fsm *xr_fsm_create_for_scrolling (const struct output_item *, + const struct xr_fsm_style *, + cairo_t *); void xr_fsm_measure (struct xr_fsm *, cairo_t *, int *w, int *h); void xr_fsm_draw_all (struct xr_fsm *, cairo_t *); void xr_fsm_draw_region (struct xr_fsm *, cairo_t *, int x, int y, int w, int h); +/* Interface used for rendering output items to a series of printed pages. */ +struct xr_fsm *xr_fsm_create_for_printing (const struct output_item *, + const struct xr_fsm_style *, + cairo_t *); +void xr_fsm_destroy (struct xr_fsm *); int xr_fsm_draw_slice (struct xr_fsm *, cairo_t *, int space); bool xr_fsm_is_empty (const struct xr_fsm *); -#endif /* HAVE_CAIRO */ - #endif /* output/cairo-fsm.h */