From 0c898cdedf5de38216b5d8a600fff8382ba9eeac Mon Sep 17 00:00:00 2001 From: James Bursa Date: Sun, 17 Oct 2004 21:03:19 +0000 Subject: [project @ 2004-10-17 21:03:19 by bursa] New target-independent interface for plotting and RISC OS screen implementation. svn path=/import/netsurf/; revision=1312 --- desktop/plotters.h | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 desktop/plotters.h (limited to 'desktop/plotters.h') diff --git a/desktop/plotters.h b/desktop/plotters.h new file mode 100644 index 000000000..7d2d89f71 --- /dev/null +++ b/desktop/plotters.h @@ -0,0 +1,47 @@ +/* + * This file is part of NetSurf, http://netsurf.sourceforge.net/ + * Licensed under the GNU General Public License, + * http://www.opensource.org/licenses/gpl-license + * Copyright 2004 James Bursa + */ + +/** \file + * Target independent plotting (interface). + */ + +#ifndef _NETSURF_DESKTOP_PLOTTERS_H_ +#define _NETSURF_DESKTOP_PLOTTERS_H_ + +#include +#include "netsurf/css/css.h" + + +struct bitmap; +struct font_data; + + +/** Set of target specific plotting functions. */ +struct plotter_table { + bool (*clg)(colour c); + bool (*rectangle)(int x0, int y0, int width, int height, + colour c, bool dotted); + bool (*line)(int x0, int y0, int x1, int y1, int width, + colour c, bool dotted, bool dashed); + bool (*polygon)(int *p, unsigned int n, colour fill); + bool (*fill)(int x0, int y0, int x1, int y1, colour c); + bool (*clip)(int x0, int y0, int x1, int y1); + bool (*text)(int x, int y, struct font_data *font, const char *text, + size_t length, colour bg, colour c); + bool (*disc)(int x, int y, int radius, colour c); + bool (*bitmap)(int x, int y, int width, int height, + struct bitmap *bitmap, colour bg); + bool (*bitmap_tile)(int x, int y, int width, int height, + struct bitmap *bitmap, colour bg, + bool repeat_x, bool repeat_y); +}; + +/** Current plotters, must be assigned before use. */ +extern struct plotter_table plot; + + +#endif -- cgit v1.2.3