summaryrefslogtreecommitdiff
path: root/desktop/plotters.h
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2009-07-10 18:36:49 +0000
committerVincent Sanders <vince@netsurf-browser.org>2009-07-10 18:36:49 +0000
commit680298e61ce664e95b3f8143c0c0b814d5966f2a (patch)
treecd4bdf673143a3ff8496498927de526adfb9804e /desktop/plotters.h
parent5feb7018c5228a22d370d070c1f7c3dad2c71e25 (diff)
downloadnetsurf-680298e61ce664e95b3f8143c0c0b814d5966f2a.tar.gz
netsurf-680298e61ce664e95b3f8143c0c0b814d5966f2a.tar.bz2
plotters line refactor
svn path=/trunk/netsurf/; revision=8446
Diffstat (limited to 'desktop/plotters.h')
-rw-r--r--desktop/plotters.h30
1 files changed, 3 insertions, 27 deletions
diff --git a/desktop/plotters.h b/desktop/plotters.h
index 3f317b1af..4a6261516 100644
--- a/desktop/plotters.h
+++ b/desktop/plotters.h
@@ -26,7 +26,7 @@
#include <stdbool.h>
#include "css/css.h"
#include "content/content.h"
-
+#include "desktop/plot_style.h"
struct bitmap;
@@ -35,29 +35,6 @@ typedef unsigned long bitmap_flags_t;
#define BITMAPF_REPEAT_X 1
#define BITMAPF_REPEAT_Y 2
-typedef enum {
- PLOT_OP_TYPE_NONE = 0, /**< No operation */
- PLOT_OP_TYPE_SOLID, /**< Solid colour */
- PLOT_OP_TYPE_DOT, /**< Doted plot */
- PLOT_OP_TYPE_DASH, /**< dashed plot */
-} plot_operation_type_t;
-
-
-typedef struct {
- plot_operation_type_t stroke_type;
- int stroke_width;
- colour stroke_colour;
- plot_operation_type_t fill_type;
- colour fill_colour;
-} plot_style_t;
-
-/* global styles */
-extern plot_style_t *plot_style_fill_white;
-extern plot_style_t *plot_style_fill_red;
-extern plot_style_t *plot_style_fill_black;
-extern plot_style_t *plot_style_stroke_red;
-extern plot_style_t *plot_style_stroke_blue;
-extern plot_style_t *plot_style_stroke_yellow;
/** Set of target specific plotting functions.
*
@@ -118,9 +95,8 @@ extern plot_style_t *plot_style_stroke_yellow;
* 3 | | | | | |
*/
struct plotter_table {
- bool (*rectangle)(int x0, int y0, int x1, int y1, const plot_style_t *style);
- bool (*line)(int x0, int y0, int x1, int y1, int width,
- colour c, bool dotted, bool dashed);
+ 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);
bool (*clip)(int x0, int y0, int x1, int y1);
bool (*text)(int x, int y, const struct css_style *style,