summaryrefslogtreecommitdiff
path: root/desktop/plot_style.c
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/plot_style.c
parent5feb7018c5228a22d370d070c1f7c3dad2c71e25 (diff)
downloadnetsurf-680298e61ce664e95b3f8143c0c0b814d5966f2a.tar.gz
netsurf-680298e61ce664e95b3f8143c0c0b814d5966f2a.tar.bz2
plotters line refactor
svn path=/trunk/netsurf/; revision=8446
Diffstat (limited to 'desktop/plot_style.c')
-rw-r--r--desktop/plot_style.c121
1 files changed, 121 insertions, 0 deletions
diff --git a/desktop/plot_style.c b/desktop/plot_style.c
new file mode 100644
index 000000000..8ed8fb5e6
--- /dev/null
+++ b/desktop/plot_style.c
@@ -0,0 +1,121 @@
+/*
+ * Copyright 2009 Vincent Sanders <vince@kyllikki.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/** \file Plotter global styles.
+ *
+ * These plot styles are globaly available and used in many places.
+ */
+
+#include "desktop/plotters.h"
+
+static plot_style_t plot_style_fill_white_static = {
+ .fill_type = PLOT_OP_TYPE_SOLID,
+ .fill_colour = 0xffffff,
+};
+plot_style_t *plot_style_fill_white = &plot_style_fill_white_static;
+
+static plot_style_t plot_style_fill_black_static = {
+ .fill_type = PLOT_OP_TYPE_SOLID,
+ .fill_colour = 0x0,
+};
+plot_style_t *plot_style_fill_black = &plot_style_fill_black_static;
+
+static plot_style_t plot_style_fill_red_static = {
+ .fill_type = PLOT_OP_TYPE_SOLID,
+ .fill_colour = 0x000000ff,
+};
+plot_style_t *plot_style_fill_red = &plot_style_fill_red_static;
+
+static plot_style_t plot_style_stroke_red_static = {
+ .stroke_type = PLOT_OP_TYPE_SOLID,
+ .stroke_colour = 0x000000ff,
+ .stroke_width = 1,
+};
+plot_style_t *plot_style_stroke_red = &plot_style_stroke_red_static;
+
+static plot_style_t plot_style_stroke_blue_static = {
+ .stroke_type = PLOT_OP_TYPE_SOLID,
+ .stroke_colour = 0x00ff0000,
+ .stroke_width = 1,
+};
+plot_style_t *plot_style_stroke_blue = &plot_style_stroke_blue_static;
+
+static plot_style_t plot_style_stroke_yellow_static = {
+ .stroke_type = PLOT_OP_TYPE_SOLID,
+ .stroke_colour = 0x0000ffff,
+ .stroke_width = 1,
+};
+plot_style_t *plot_style_stroke_yellow = &plot_style_stroke_yellow_static;
+
+/* caret style used in html_redraw_caret */
+static plot_style_t plot_style_caret_static = {
+ .stroke_type = PLOT_OP_TYPE_SOLID,
+ .stroke_colour = 0x808080, /* todo - choose a proper colour */
+};
+plot_style_t *plot_style_caret = &plot_style_caret_static;
+
+
+
+/* html redraw widget styles */
+
+/** plot style for widget base. */
+static plot_style_t plot_style_fill_wbasec_static = {
+ .fill_type = PLOT_OP_TYPE_SOLID,
+ .fill_colour = WIDGET_BASEC,
+};
+plot_style_t *plot_style_fill_wbasec = &plot_style_fill_wbasec_static;
+
+
+/** plot style for widget background. */
+static plot_style_t plot_style_fill_wblobc_static = {
+ .fill_type = PLOT_OP_TYPE_SOLID,
+ .fill_colour = WIDGET_BLOBC,
+};
+plot_style_t *plot_style_fill_wblobc = &plot_style_fill_wblobc_static;
+
+/** plot style for checkbox cross. */
+static plot_style_t plot_style_stroke_wblobc_static = {
+ .stroke_type = PLOT_OP_TYPE_SOLID,
+ .stroke_colour = WIDGET_BLOBC,
+ .stroke_width = 2,
+};
+plot_style_t *plot_style_stroke_wblobc = &plot_style_stroke_wblobc_static;
+
+/** stroke style for widget double dark colour. */
+static plot_style_t plot_style_stroke_darkwbasec_static = {
+ .stroke_type = PLOT_OP_TYPE_SOLID,
+ .stroke_colour = double_darken_colour(WIDGET_BASEC),
+};
+plot_style_t *plot_style_stroke_darkwbasec = &plot_style_stroke_darkwbasec_static;
+
+/** stroke style for widget double light colour. */
+static plot_style_t plot_style_stroke_lightwbasec_static = {
+ .stroke_type = PLOT_OP_TYPE_SOLID,
+ .stroke_colour = double_lighten_colour(WIDGET_BASEC),
+};
+plot_style_t *plot_style_stroke_lightwbasec = &plot_style_stroke_lightwbasec_static;
+
+/* history styles */
+
+/** stroke style for history core. */
+static plot_style_t plot_style_stroke_history_static = {
+ .stroke_type = PLOT_OP_TYPE_SOLID,
+ .stroke_colour = 0x333333,
+};
+plot_style_t *plot_style_stroke_history = &plot_style_stroke_history_static;
+