NetSurf
plot_style.c
Go to the documentation of this file.
1/*
2 * Copyright 2009 Vincent Sanders <vince@kyllikki.org>
3 *
4 * This file is part of NetSurf, http://www.netsurf-browser.org/
5 *
6 * NetSurf is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * NetSurf is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19/**
20 * \file
21 * \brief Plotter global styles.
22 *
23 * These plot styles are globaly available and used in many places.
24 */
25
26#include "netsurf/plot_style.h"
27
30 .fill_colour = 0xffffff,
31};
33
36 .fill_colour = 0x0,
37};
39
42 .fill_colour = 0x000000ff,
43};
45
46/* Box model debug outline styles for content, padding and margin edges */
49 .stroke_colour = 0x00ff0000,
50 .stroke_width = plot_style_int_to_fixed(1),
51};
54
57 .stroke_colour = 0x000000ff,
58 .stroke_width = plot_style_int_to_fixed(1),
59};
62
65 .stroke_colour = 0x0000ffff,
66 .stroke_width = plot_style_int_to_fixed(1),
67};
70
71/* Broken object replacement styles */
74 .fill_colour = 0x008888ff,
75 .stroke_type = PLOT_OP_TYPE_SOLID,
76 .stroke_colour = 0x000000ff,
77 .stroke_width = plot_style_int_to_fixed(1),
78};
81
84 .size = 16 * PLOT_STYLE_SCALE,
85 .weight = 400,
86 .flags = FONTF_NONE,
87 .background = 0x8888ff,
88 .foreground = 0x000044,
89};
92
93/* caret style used in html_redraw_caret */
96 .stroke_colour = 0x0000ff, /* todo - choose a proper colour */
97};
99
100
101
102/* html redraw widget styles */
103
104/** plot style for filled widget base colour. */
107 .fill_colour = WIDGET_BASEC,
108};
110
111/** plot style for dark filled widget base colour . */
114 .fill_colour = double_darken_colour(WIDGET_BASEC),
115};
117
118/** plot style for light filled widget base colour. */
121 .fill_colour = double_lighten_colour(WIDGET_BASEC),
122};
124
125
126/** plot style for widget background. */
129 .fill_colour = WIDGET_BLOBC,
130};
132
133/** plot style for checkbox cross. */
136 .stroke_colour = WIDGET_BLOBC,
137 .stroke_width = plot_style_int_to_fixed(2),
138};
140
141/** stroke style for widget double dark colour. */
144 .stroke_colour = double_darken_colour(WIDGET_BASEC),
145};
147
148/** stroke style for widget double light colour. */
151 .stroke_colour = double_lighten_colour(WIDGET_BASEC),
152};
154
155
156/* Generic font style */
159 .size = 8 * PLOT_STYLE_SCALE,
160 .weight = 400,
161 .flags = FONTF_NONE,
162 .background = 0xffffff,
163 .foreground = 0x000000,
164};
166
static plot_style_t plot_style_fill_red_static
Definition: plot_style.c:40
plot_style_t * plot_style_fill_white
Definition: plot_style.c:32
static plot_style_t plot_style_stroke_lightwbasec_static
stroke style for widget double light colour.
Definition: plot_style.c:149
static plot_style_t plot_style_fill_black_static
Definition: plot_style.c:34
plot_style_t const *const plot_style_broken_object
Definition: plot_style.c:79
plot_style_t const *const plot_style_margin_edge
Definition: plot_style.c:68
static const plot_style_t plot_style_margin_edge_static
Definition: plot_style.c:63
plot_font_style_t const *const plot_style_font
Definition: plot_style.c:165
plot_style_t const *const plot_style_content_edge
Definition: plot_style.c:52
plot_style_t * plot_style_fill_wbasec
Definition: plot_style.c:109
static plot_style_t plot_style_fill_white_static
Definition: plot_style.c:28
plot_style_t * plot_style_stroke_darkwbasec
Definition: plot_style.c:146
plot_style_t * plot_style_caret
Definition: plot_style.c:98
static const plot_style_t plot_style_content_edge_static
Definition: plot_style.c:47
static plot_style_t plot_style_fill_wblobc_static
plot style for widget background.
Definition: plot_style.c:127
static const plot_style_t plot_style_padding_edge_static
Definition: plot_style.c:55
static plot_style_t plot_style_caret_static
Definition: plot_style.c:94
plot_style_t * plot_style_fill_red
Definition: plot_style.c:44
plot_style_t const *const plot_style_padding_edge
Definition: plot_style.c:60
plot_style_t * plot_style_fill_wblobc
Definition: plot_style.c:131
static plot_style_t plot_style_fill_wbasec_static
plot style for filled widget base colour.
Definition: plot_style.c:105
plot_font_style_t const *const plot_fstyle_broken_object
Definition: plot_style.c:90
plot_style_t * plot_style_fill_black
Definition: plot_style.c:38
static const plot_style_t plot_style_broken_object_static
Definition: plot_style.c:72
static const plot_font_style_t plot_fstyle_broken_object_static
Definition: plot_style.c:82
static plot_style_t plot_style_fill_darkwbasec_static
plot style for dark filled widget base colour .
Definition: plot_style.c:112
plot_style_t * plot_style_stroke_lightwbasec
Definition: plot_style.c:153
plot_style_t * plot_style_fill_lightwbasec
Definition: plot_style.c:123
static plot_style_t plot_style_fill_lightwbasec_static
plot style for light filled widget base colour.
Definition: plot_style.c:119
static plot_style_t plot_style_stroke_wblobc_static
plot style for checkbox cross.
Definition: plot_style.c:134
plot_style_t * plot_style_stroke_wblobc
Definition: plot_style.c:139
plot_style_t * plot_style_fill_darkwbasec
Definition: plot_style.c:116
static const plot_font_style_t plot_style_font_static
Definition: plot_style.c:157
static plot_style_t plot_style_stroke_darkwbasec_static
stroke style for widget double dark colour.
Definition: plot_style.c:142
plotter style interfaces, generic styles and style colour helpers.
#define plot_style_int_to_fixed(v)
Definition: plot_style.h:51
@ PLOT_OP_TYPE_SOLID
Solid colour.
Definition: plot_style.h:67
#define WIDGET_BASEC
light grey widget base colour
Definition: plot_style.h:33
@ FONTF_NONE
Definition: plot_style.h:102
#define double_lighten_colour(c1)
Definition: plot_style.h:156
@ PLOT_FONT_FAMILY_SANS_SERIF
Definition: plot_style.h:89
#define PLOT_STYLE_SCALE
Scaling factor for plot styles.
Definition: plot_style.h:45
#define WIDGET_BLOBC
black blob colour
Definition: plot_style.h:36
#define double_darken_colour(c1)
Definition: plot_style.h:138
Font style for plotting.
Definition: plot_style.h:111
plot_font_generic_family_t family
Generic family to plot with.
Definition: plot_style.h:118
Plot style for stroke/fill plotters.
Definition: plot_style.h:76
plot_operation_type_t fill_type
Fill plot type.
Definition: plot_style.h:80
plot_operation_type_t stroke_type
Stroke plot type.
Definition: plot_style.h:77