summaryrefslogtreecommitdiff
path: root/desktop/plotters.h
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2009-07-14 10:03:58 +0000
committerVincent Sanders <vince@netsurf-browser.org>2009-07-14 10:03:58 +0000
commit86232d72a6709243136496770aade7c4d47ef28a (patch)
treee6c849cb2f755a6ef314ccdb5a05122bec7dcd52 /desktop/plotters.h
parented2206316ceb8fe422085a4a50c028aa7718d644 (diff)
downloadnetsurf-86232d72a6709243136496770aade7c4d47ef28a.tar.gz
netsurf-86232d72a6709243136496770aade7c4d47ef28a.tar.bz2
next round of plotter refactor
svn path=/trunk/netsurf/; revision=8512
Diffstat (limited to 'desktop/plotters.h')
-rw-r--r--desktop/plotters.h31
1 files changed, 22 insertions, 9 deletions
diff --git a/desktop/plotters.h b/desktop/plotters.h
index 4a6261516..91fbd5188 100644
--- a/desktop/plotters.h
+++ b/desktop/plotters.h
@@ -95,22 +95,35 @@ typedef unsigned long bitmap_flags_t;
* 3 | | | | | |
*/
struct plotter_table {
- bool (*rectangle)(int x0, int y0, int x1, int y1, const plot_style_t *pstyle);
- bool (*line)(int x0, int y0, int x1, int y1, const plot_style_t *pstyle);
- bool (*polygon)(const int *p, unsigned int n, colour fill);
+ /* clipping operations */
bool (*clip)(int x0, int y0, int x1, int y1);
- bool (*text)(int x, int y, const struct css_style *style,
- const char *text, size_t length, colour bg, colour c);
- bool (*disc)(int x, int y, int radius, colour c, bool filled);
- bool (*arc)(int x, int y, int radius, int angle1, int angle2, colour c);
+
+ /* shape primatives */
+ bool (*arc)(int x, int y, int radius, int angle1, int angle2, const plot_style_t *pstyle);
+ bool (*disc)(int x, int y, int radius, const plot_style_t *pstyle);
+ bool (*line)(int x0, int y0, int x1, int y1, const plot_style_t *pstyle);
+ bool (*rectangle)(int x0, int y0, int x1, int y1, const plot_style_t *pstyle);
+ bool (*polygon)(const int *p, unsigned int n, const plot_style_t *pstyle);
+
+ /* complex path (for SVG) */
+ bool (*path)(const float *p, unsigned int n, colour fill, float width,
+ colour c, const float transform[6]);
+
+ /* Image */
bool (*bitmap)(int x, int y, int width, int height,
struct bitmap *bitmap, colour bg,
bitmap_flags_t flags);
+
+ /* text */
+ bool (*text)(int x, int y, const struct css_style *style,
+ const char *text, size_t length, colour bg, colour c);
+
+ /* optional callbacks */
bool (*group_start)(const char *name); /**< optional, may be NULL */
bool (*group_end)(void); /**< optional, may be NULL */
bool (*flush)(void); /**< optional, may be NULL */
- bool (*path)(const float *p, unsigned int n, colour fill, float width,
- colour c, const float transform[6]);
+
+ /* flags */
bool option_knockout; /**< set if knockout rendering is required */
};