[goffice] Deprecate GOStyle::outline [#593608]
- From: Jean Bréfort <jbrefort src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [goffice] Deprecate GOStyle::outline [#593608]
- Date: Mon, 31 Aug 2009 17:32:17 +0000 (UTC)
commit 1deb2d719ef9f06a2a3c28447d48ae5145f6aa43
Author: Jean Brefort <jean brefort normalesup org>
Date: Mon Aug 31 19:20:15 2009 +0200
Deprecate GOStyle::outline [#593608]
ChangeLog | 6 ++
NEWS | 3 +
goffice/canvas/goc-circle.c | 16 +++---
goffice/canvas/goc-ellipse.c | 12 ++--
goffice/canvas/goc-pixbuf.c | 2 +-
goffice/canvas/goc-polygon.c | 12 ++--
goffice/canvas/goc-polyline.c | 2 +-
goffice/canvas/goc-rectangle.c | 14 ++--
goffice/canvas/goc-styled-item.c | 6 +-
goffice/graph/gog-guru.c | 12 ++--
goffice/graph/gog-label.c | 2 +-
goffice/graph/gog-legend.c | 10 +--
goffice/graph/gog-outlined-object.c | 4 +-
goffice/graph/gog-renderer.c | 78 ++++---------------------
goffice/graph/gog-theme.c | 106 +++++++++++++++++-----------------
goffice/gtk/go-3d-rotation-sel.c | 20 +++---
goffice/gtk/go-rotation-sel.c | 8 +-
goffice/utils/go-style.c | 36 +++++-------
goffice/utils/go-style.h | 2 +-
plugins/plot_barcol/gog-dropbar.c | 2 +-
plugins/plot_distrib/gog-boxplot.c | 3 +-
plugins/plot_pie/gog-pie.c | 6 +-
plugins/plot_surface/gog-contour.c | 34 ++++++------
23 files changed, 171 insertions(+), 225 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e3251cf..8d3d95f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-08-31 Jean Brefort <jean brefort normalesup org>
+
+ * all files: deprecate GOStyle::outline. [#593608]
+ * goffice/canvas/goc-pixbuf.c (goc_pixbuf_draw): don't display a null sized
+ pixbuf item.
+
2009-08-30 Morten Welinder <terra gnome org>
* goffice/canvas/goc-item.c (goc_item_new): Keep track of realize.
diff --git a/NEWS b/NEWS
index 8f2ca5d..bb5c716 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
goffice 0.7.11:
+Jean:
+ * Deprecated GOStyle::outline. [#593608]
+
Morten:
* Fix canvas item realize/unrealize problems. [#593593]
diff --git a/goffice/canvas/goc-circle.c b/goffice/canvas/goc-circle.c
index d0eb18f..ccae550 100644
--- a/goffice/canvas/goc-circle.c
+++ b/goffice/canvas/goc-circle.c
@@ -89,8 +89,8 @@ goc_circle_distance (GocItem *item, double x, double y, GocItem **near_item)
GocCircle *circle = GOC_CIRCLE (item);
GOStyle *style = go_styled_object_get_style (GO_STYLED_OBJECT (item));
double d, extra_dist = 0.;
- if (style->outline.dash_type != GO_LINE_NONE)
- extra_dist = (style->outline.width)? style->outline.width / 2.: .5;
+ if (style->line.dash_type != GO_LINE_NONE)
+ extra_dist = (style->line.width)? style->line.width / 2.: .5;
*near_item = item;
x -= circle->x;
y -= circle->y;
@@ -125,8 +125,8 @@ goc_circle_update_bounds (GocItem *item)
GocCircle *circle = GOC_CIRCLE (item);
GOStyle *style = go_styled_object_get_style (GO_STYLED_OBJECT (item));
double r = circle->radius;
- if (style->outline.dash_type != GO_LINE_NONE)
- r += (style->outline.width)? style->outline.width / 2.: .5;
+ if (style->line.dash_type != GO_LINE_NONE)
+ r += (style->line.width)? style->line.width / 2.: .5;
item->x0 = circle->x - r;
item->y0 = circle->y - r;
item->x1 = circle->x + r;
@@ -137,10 +137,10 @@ static void
goc_circle_init_style (G_GNUC_UNUSED GocStyledItem *item, GOStyle *style)
{
style->interesting_fields = GO_STYLE_OUTLINE | GO_STYLE_FILL;
- if (style->outline.auto_dash)
- style->outline.dash_type = GO_LINE_SOLID;
- if (style->outline.auto_color)
- style->outline.color = RGBA_BLACK;
+ if (style->line.auto_dash)
+ style->line.dash_type = GO_LINE_SOLID;
+ if (style->line.auto_color)
+ style->line.color = RGBA_BLACK;
if (style->fill.auto_type)
style->fill.type = GO_STYLE_FILL_PATTERN;
if (style->fill.auto_fore)
diff --git a/goffice/canvas/goc-ellipse.c b/goffice/canvas/goc-ellipse.c
index 43e9aba..c36d203 100644
--- a/goffice/canvas/goc-ellipse.c
+++ b/goffice/canvas/goc-ellipse.c
@@ -106,7 +106,7 @@ goc_ellipse_update_bounds (GocItem *item)
GocEllipse *ellipse = GOC_ELLIPSE (item);
GOStyle *style = go_styled_object_get_style (GO_STYLED_OBJECT (item));
/* FIXME: take rotation into account */
- double extra_width = style->outline.width /2.;
+ double extra_width = style->line.width /2.;
if (extra_width <= 0.)
extra_width = .5;
item->x0 = ellipse->x - extra_width;
@@ -123,7 +123,7 @@ goc_ellipse_distance (GocItem *item, double x, double y, GocItem **near_item)
/* FIXME: take rotation into account */
/* FIXME: we just consider that a point inside the ellipse is at distance 0
even if the ellipse is not filled */
- double extra_width = (style->outline.width)? style->outline.width /2.: .5;
+ double extra_width = (style->line.width)? style->line.width /2.: .5;
double last = G_MAXDOUBLE, df, d2f, t, cs, sn,
a = ellipse->width / 2, b = ellipse->height / 2,
c = a * a - b * b;
@@ -190,10 +190,10 @@ static void
goc_ellipse_init_style (G_GNUC_UNUSED GocStyledItem *item, GOStyle *style)
{
style->interesting_fields = GO_STYLE_OUTLINE | GO_STYLE_FILL;
- if (style->outline.auto_dash)
- style->outline.dash_type = GO_LINE_SOLID;
- if (style->outline.auto_color)
- style->outline.color = RGBA_BLACK;
+ if (style->line.auto_dash)
+ style->line.dash_type = GO_LINE_SOLID;
+ if (style->line.auto_color)
+ style->line.color = RGBA_BLACK;
if (style->fill.auto_type)
style->fill.type = GO_STYLE_FILL_PATTERN;
if (style->fill.auto_fore)
diff --git a/goffice/canvas/goc-pixbuf.c b/goffice/canvas/goc-pixbuf.c
index 922cf27..05ba35d 100644
--- a/goffice/canvas/goc-pixbuf.c
+++ b/goffice/canvas/goc-pixbuf.c
@@ -184,7 +184,7 @@ goc_pixbuf_draw (GocItem const *item, cairo_t *cr)
int x;
cairo_matrix_t mat;
- if (pixbuf->pixbuf == NULL)
+ if (pixbuf->pixbuf == NULL || pixbuf->width == 0. || pixbuf->height == 0.)
return;
image = go_image_new_from_pixbuf (pixbuf->pixbuf);
diff --git a/goffice/canvas/goc-polygon.c b/goffice/canvas/goc-polygon.c
index 65cf3ad..bf9fb6e 100644
--- a/goffice/canvas/goc-polygon.c
+++ b/goffice/canvas/goc-polygon.c
@@ -88,7 +88,7 @@ goc_polygon_update_bounds (GocItem *item)
{
GocPolygon *polygon = GOC_POLYGON (item);
GOStyle *style = go_styled_object_get_style (GO_STYLED_OBJECT (item));
- double extra_width = style->outline.width;
+ double extra_width = style->line.width;
unsigned i;
if (extra_width <= 0.)
extra_width = 1.;
@@ -119,7 +119,7 @@ goc_polygon_distance (GocItem *item, double x, double y, GocItem **near_item)
GocPolygon *polygon = GOC_POLYGON (item);
GOStyle *style = go_styled_object_get_style (GO_STYLED_OBJECT (item));
/* FIXME: implement the use_spline case */
- double extra_width = (style->outline.width)? style->outline.width /2.: .5;
+ double extra_width = (style->line.width)? style->line.width /2.: .5;
double dx, dy, l, startx, starty, x_, y_, t, res = 0.;
int i, n;
@@ -202,10 +202,10 @@ static void
goc_polygon_init_style (G_GNUC_UNUSED GocStyledItem *item, GOStyle *style)
{
style->interesting_fields = GO_STYLE_OUTLINE | GO_STYLE_FILL;
- if (style->outline.auto_dash)
- style->outline.dash_type = GO_LINE_SOLID;
- if (style->outline.auto_color)
- style->outline.color = RGBA_BLACK;
+ if (style->line.auto_dash)
+ style->line.dash_type = GO_LINE_SOLID;
+ if (style->line.auto_color)
+ style->line.color = RGBA_BLACK;
if (style->fill.auto_type)
style->fill.type = GO_STYLE_FILL_PATTERN;
if (style->fill.auto_fore)
diff --git a/goffice/canvas/goc-polyline.c b/goffice/canvas/goc-polyline.c
index f16975d..594b9be 100644
--- a/goffice/canvas/goc-polyline.c
+++ b/goffice/canvas/goc-polyline.c
@@ -120,7 +120,7 @@ goc_polyline_distance (GocItem *item, double x, double y, GocItem **near_item)
GocPolyline *polyline = GOC_POLYLINE (item);
GOStyle *style = go_styled_object_get_style (GO_STYLED_OBJECT (item));
/* FIXME: implement the use_spline case */
- double extra_width = (style->outline.width)? style->outline.width /2.: .5;
+ double extra_width = (style->line.width)? style->line.width /2.: .5;
double dx, dy, l, startx, starty, x_, y_, t, res;
unsigned i;
diff --git a/goffice/canvas/goc-rectangle.c b/goffice/canvas/goc-rectangle.c
index 7ae50d9..3605b87 100644
--- a/goffice/canvas/goc-rectangle.c
+++ b/goffice/canvas/goc-rectangle.c
@@ -106,7 +106,7 @@ goc_rectangle_update_bounds (GocItem *item)
GocRectangle *rect = GOC_RECTANGLE (item);
GOStyle *style = go_styled_object_get_style (GO_STYLED_OBJECT (item));
/* FIXME: take rotation into account */
- double extra_width = style->outline.width /2.;
+ double extra_width = style->line.width /2.;
if (extra_width <= 0.)
extra_width = .5;
item->x0 = rect->x - extra_width;
@@ -121,7 +121,7 @@ goc_rectangle_distance (GocItem *item, double x, double y, GocItem **near_item)
GocRectangle *rect = GOC_RECTANGLE (item);
GOStyle *style = go_styled_object_get_style (GO_STYLED_OBJECT (item));
/* FIXME: take rotation into account */
- double extra_width = (style->outline.width)? style->outline.width /2.: .5;
+ double extra_width = (style->line.width)? style->line.width /2.: .5;
double dx, dy;
if (x < rect->x - extra_width) {
dx = rect->x - extra_width - x;
@@ -145,7 +145,7 @@ static void
goc_rectangle_draw (GocItem const *item, cairo_t *cr)
{
GocRectangle *rect = GOC_RECTANGLE (item);
- double hoffs, voffs = ceil (go_styled_object_get_style (GO_STYLED_OBJECT (item))->outline.width);
+ double hoffs, voffs = ceil (go_styled_object_get_style (GO_STYLED_OBJECT (item))->line.width);
if (voffs <= 0.)
voffs = 1.;
hoffs = ((int) voffs & 1)? .5: 0.;
@@ -171,10 +171,10 @@ static void
goc_rectangle_init_style (G_GNUC_UNUSED GocStyledItem *item, GOStyle *style)
{
style->interesting_fields = GO_STYLE_OUTLINE | GO_STYLE_FILL;
- if (style->outline.auto_dash)
- style->outline.dash_type = GO_LINE_SOLID;
- if (style->outline.auto_color)
- style->outline.color = RGBA_BLACK;
+ if (style->line.auto_dash)
+ style->line.dash_type = GO_LINE_SOLID;
+ if (style->line.auto_color)
+ style->line.color = RGBA_BLACK;
if (style->fill.auto_type)
style->fill.type = GO_STYLE_FILL_PATTERN;
if (style->fill.auto_fore)
diff --git a/goffice/canvas/goc-styled-item.c b/goffice/canvas/goc-styled-item.c
index e065af1..5cf9351 100644
--- a/goffice/canvas/goc-styled-item.c
+++ b/goffice/canvas/goc-styled-item.c
@@ -240,12 +240,12 @@ goc_styled_item_set_cairo_line (GocStyledItem const *gsi, cairo_t *cr)
/* scale the line width */
if (gsi->scale_line_width) {
- width = gsi->style->outline.width;
- gsi->style->outline.width *= goc_canvas_get_pixels_per_unit (GOC_ITEM (gsi)->canvas);
+ width = gsi->style->line.width;
+ gsi->style->line.width *= goc_canvas_get_pixels_per_unit (GOC_ITEM (gsi)->canvas);
}
result = go_styled_object_set_cairo_line (GO_STYLED_OBJECT (gsi), cr);
/* restore the line width */
if (gsi->scale_line_width)
- gsi->style->outline.width = width;
+ gsi->style->line.width = width;
return result;
}
diff --git a/goffice/graph/gog-guru.c b/goffice/graph/gog-guru.c
index e3a0274..0a008cf 100644
--- a/goffice/graph/gog-guru.c
+++ b/goffice/graph/gog-guru.c
@@ -920,14 +920,14 @@ graph_guru_init_format_page (GraphGuruState *s)
GOC_TYPE_RECTANGLE,
NULL);
style= go_styled_object_get_style (GO_STYLED_OBJECT (s->sample_graph_shadow));
- style->outline.width = 2;
- style->outline.color = 0xa0a0a0ff; /* grey */
+ style->line.width = 2;
+ style->line.color = 0xa0a0a0ff; /* grey */
s->sample_graph_frame = goc_item_new (goc_canvas_get_root (GOC_CANVAS (canvas)),
GOC_TYPE_RECTANGLE,
NULL);
style= go_styled_object_get_style (GO_STYLED_OBJECT (s->sample_graph_frame));
- style->outline.width = 1;
- style->outline.color = 0x707070ff; /* grey */
+ style->line.width = 1;
+ style->line.color = 0x707070ff; /* grey */
style->fill.pattern.back = 0xffffffff; /* white */
s->sample_graph_item = goc_item_new (goc_canvas_get_root (GOC_CANVAS (canvas)),
GOC_TYPE_GRAPH,
@@ -1185,8 +1185,8 @@ graph_guru_type_selector_new (GraphGuruState *s)
GOC_TYPE_RECTANGLE,
NULL);
style= go_styled_object_get_style (GO_STYLED_OBJECT (typesel->selector));
- style->outline.width = 1;
- style->outline.color = 0x000000ff; /* black */
+ style->line.width = 1;
+ style->line.color = 0x000000ff; /* black */
typesel_set_selection_color (typesel);
/* Setup the description label */
diff --git a/goffice/graph/gog-label.c b/goffice/graph/gog-label.c
index a116a84..4b77198 100644
--- a/goffice/graph/gog-label.c
+++ b/goffice/graph/gog-label.c
@@ -471,7 +471,7 @@ gog_text_view_render (GogView *view, GogViewAllocation const *bbox)
gog_renderer_push_style (view->renderer, style);
if (str != NULL) {
double outline = gog_renderer_line_size (view->renderer,
- goo->base.style->outline.width);
+ goo->base.style->line.width);
if (style->fill.type != GO_STYLE_FILL_NONE || outline > 0.) {
GogViewAllocation rect;
GOGeometryAABR aabr;
diff --git a/goffice/graph/gog-legend.c b/goffice/graph/gog-legend.c
index c9bba34..7ed8aae 100644
--- a/goffice/graph/gog-legend.c
+++ b/goffice/graph/gog-legend.c
@@ -386,10 +386,8 @@ cb_swatch_scale (unsigned i, GOStyle const *style, char const *name,
if (data->size_min > size)
data->size_min = size;
- if (style->interesting_fields & GO_STYLE_LINE)
+ if (style->interesting_fields & (GO_STYLE_LINE | GO_STYLE_OUTLINE))
line = &style->line;
- else if (style->interesting_fields & GO_STYLE_OUTLINE)
- line = &style->outline;
if (line == NULL ||
line->width <= data->hairline_width)
@@ -474,9 +472,9 @@ cb_render_elements (unsigned index, GOStyle const *base_style, char const *name,
gog_renderer_draw_marker (renderer, data->x + data->swatch.w * GLV_LINE_LENGTH_EM * 0.5, y);
} else { /* area swatch */
style = go_style_dup (base_style);
- if (style->outline.width > data->hairline_width)
- style->outline.width =
- 0.5 * (data->hairline_width + style->outline.width) * data->line_scale_a +
+ if (style->line.width > data->hairline_width)
+ style->line.width =
+ 0.5 * (data->hairline_width + style->line.width) * data->line_scale_a +
data->line_scale_b;
rectangle = data->swatch;
diff --git a/goffice/graph/gog-outlined-object.c b/goffice/graph/gog-outlined-object.c
index ec76d44..f6a5b85 100644
--- a/goffice/graph/gog-outlined-object.c
+++ b/goffice/graph/gog-outlined-object.c
@@ -105,7 +105,7 @@ gog_outlined_view_size_request (GogView *v,
{
GogOutlinedObject *goo = GOG_OUTLINED_OBJECT (v->model);
double outline = gog_renderer_line_size (v->renderer,
- goo->base.style->outline.width);
+ goo->base.style->line.width);
double is_outline_visible = go_style_is_outline_visible (goo->base.style);
if (goo->base.style->fill.type != GO_STYLE_FILL_NONE || is_outline_visible) {
@@ -122,7 +122,7 @@ gog_outlined_view_size_allocate (GogView *v, GogViewAllocation const *a)
GogOutlinedObject *goo = GOG_OUTLINED_OBJECT (v->model);
GogViewAllocation res = *a;
double outline = gog_renderer_line_size (v->renderer,
- goo->base.style->outline.width);
+ goo->base.style->line.width);
double is_outline_visible = go_style_is_outline_visible (goo->base.style);
/* We only need internal padding if there is an outline or a pattern */
diff --git a/goffice/graph/gog-renderer.c b/goffice/graph/gog-renderer.c
index 3c46212..24f5425 100644
--- a/goffice/graph/gog-renderer.c
+++ b/goffice/graph/gog-renderer.c
@@ -79,7 +79,6 @@ struct _GogRenderer {
GSList *style_stack;
GOLineDashSequence *line_dash;
- GOLineDashSequence *outline_dash;
GOStyle *grip_style;
GOStyle *selection_style;
@@ -144,16 +143,12 @@ _update_dash (GogRenderer *rend)
go_line_dash_sequence_free (rend->line_dash);
rend->line_dash = NULL;
- go_line_dash_sequence_free (rend->outline_dash);
- rend->outline_dash = NULL;
if (rend->cur_style == NULL)
return;
size = _line_size (rend, rend->cur_style->line.width, FALSE);
rend->line_dash = go_line_dash_get_sequence (rend->cur_style->line.dash_type, size);
- size = _line_size (rend, rend->cur_style->outline.width, FALSE);
- rend->outline_dash = go_line_dash_get_sequence (rend->cur_style->outline.dash_type, size);
}
double
@@ -216,39 +211,6 @@ emit_line (GogRenderer *rend, gboolean preserve, GOPathOptions options)
}
static void
-emit_outline (GogRenderer *rend, gboolean preserve, GOPathOptions options)
-{
- GOStyle const *style = rend->cur_style;
- cairo_t *cr = rend->cairo;
- double width;
-
- if (!go_style_is_outline_visible (style)) {
- if (!preserve)
- cairo_new_path (cr);
- return;
- }
-
- width = _grc_line_size (rend, style->outline.width, options & GO_PATH_OPTIONS_SNAP_WIDTH);
- cairo_set_line_width (cr, width);
- if (rend->outline_dash != NULL)
- cairo_set_dash (cr,
- rend->outline_dash->dash,
- rend->outline_dash->n_dash,
- rend->outline_dash->offset);
- else
- cairo_set_dash (cr, NULL, 0, 0);
-
- cairo_set_source_rgba (cr, GO_COLOR_TO_CAIRO (style->outline.color));
- cairo_set_line_cap (cr, (width <= 2.0 && !rend->is_vector) ?
- CAIRO_LINE_CAP_SQUARE : CAIRO_LINE_CAP_ROUND);
-
- if (preserve)
- cairo_stroke_preserve (cr);
- else
- cairo_stroke (cr);
-}
-
-static void
emit_fill (GogRenderer *rend, gboolean preserve)
{
GOStyle const *style = rend->cur_style;
@@ -435,7 +397,6 @@ gog_renderer_stroke_serie (GogRenderer *renderer,
{
GOStyle const *style;
GOPathOptions line_options;
- gboolean is_outline;
double width;
g_return_if_fail (GOG_IS_RENDERER (renderer));
@@ -443,18 +404,14 @@ gog_renderer_stroke_serie (GogRenderer *renderer,
g_return_if_fail (GO_IS_PATH (path));
style = renderer->cur_style;
- is_outline = style->interesting_fields & GO_STYLE_OUTLINE;
line_options = go_path_get_options (path);
width = _grc_line_size (renderer,
- is_outline ? style->outline.width : style->line.width,
+ style->line.width,
line_options & GO_PATH_OPTIONS_SNAP_WIDTH);
if (go_style_is_line_visible (style)) {
path_interpret (renderer, path, width);
- if (is_outline)
- emit_outline (renderer, FALSE, go_path_get_options (path));
- else
- emit_line (renderer, FALSE, go_path_get_options (path));
+ emit_line (renderer, FALSE, go_path_get_options (path));
}
}
@@ -483,17 +440,15 @@ _draw_shape (GogRenderer *renderer, GOPath const *path, gboolean fill, gboolean
GOStyle const *style;
GOPathOptions line_options;
double width;
- gboolean use_outline;
g_return_if_fail (GOG_IS_RENDERER (renderer));
g_return_if_fail (renderer->cur_style != NULL);
g_return_if_fail (GO_IS_PATH (path));
style = renderer->cur_style;
- use_outline = style->interesting_fields & GO_STYLE_OUTLINE;
line_options = go_path_get_options (path);
- width = stroke ? _grc_line_size (renderer, use_outline ? style->outline.width : style->line.width,
+ width = stroke ? _grc_line_size (renderer, style->line.width,
line_options & GO_PATH_OPTIONS_SNAP_WIDTH) : 0;
path_interpret (renderer, path, width);
@@ -501,12 +456,8 @@ _draw_shape (GogRenderer *renderer, GOPath const *path, gboolean fill, gboolean
if (fill)
emit_fill (renderer, stroke);
- if (stroke) {
- if (use_outline)
- emit_outline (renderer, FALSE, go_path_get_options (path));
- else
- emit_line (renderer, FALSE, go_path_get_options (path));
- }
+ if (stroke)
+ emit_line (renderer, FALSE, go_path_get_options (path));
}
void
@@ -615,7 +566,7 @@ _draw_circle (GogRenderer *rend, double x, double y, double r, gboolean fill, gb
go_path_set_options (path, GO_PATH_OPTIONS_SHARP);
if (!narrow) {
- o = gog_renderer_line_size (rend, style->outline.width);
+ o = gog_renderer_line_size (rend, style->line.width);
o_2 = o / 2.;
} else
o = o_2 = 0.;
@@ -672,7 +623,7 @@ _draw_rectangle (GogRenderer *rend, GogViewAllocation const *rect, gboolean fill
go_path_set_options (path, GO_PATH_OPTIONS_SHARP);
if (!narrow) {
- o = gog_renderer_line_size (rend, style->outline.width);
+ o = gog_renderer_line_size (rend, style->line.width);
o_2 = o / 2.;
} else
o = o_2 = 0.;
@@ -720,9 +671,9 @@ gog_renderer_draw_grip (GogRenderer *renderer, double x, double y)
GOStyle *style;
style = go_style_new ();
- style->outline.dash_type = GO_LINE_SOLID;
- style->outline.width = 0.0;
- style->outline.color =
+ style->line.dash_type = GO_LINE_SOLID;
+ style->line.width = 0.0;
+ style->line.color =
style->fill.pattern.back = 0xff000080;
style->fill.pattern.pattern = GO_PATTERN_SOLID;
style->fill.type = GO_STYLE_FILL_PATTERN;
@@ -749,9 +700,9 @@ gog_renderer_draw_selection_rectangle (GogRenderer *renderer, GogViewAllocation
GOStyle *style;
style = go_style_new ();
- style->outline.dash_type = GO_LINE_DOT;
- style->outline.width = 0.0;
- style->outline.color = 0x0000ffB0;
+ style->line.dash_type = GO_LINE_DOT;
+ style->line.width = 0.0;
+ style->line.color = 0x0000ffB0;
style->fill.type = GO_STYLE_FILL_NONE;
style->interesting_fields = GO_STYLE_OUTLINE;
@@ -1449,7 +1400,6 @@ gog_renderer_init (GogRenderer *rend)
rend->is_vector = FALSE;
rend->line_dash = NULL;
- rend->outline_dash = NULL;
rend->needs_update = FALSE;
rend->cur_style = NULL;
@@ -1483,8 +1433,6 @@ gog_renderer_finalize (GObject *obj)
go_line_dash_sequence_free (rend->line_dash);
rend->line_dash = NULL;
- go_line_dash_sequence_free (rend->outline_dash);
- rend->outline_dash = NULL;
if (rend->grip_style != NULL) {
g_object_unref (rend->grip_style);
diff --git a/goffice/graph/gog-theme.c b/goffice/graph/gog-theme.c
index 64b8767..6a1530e 100644
--- a/goffice/graph/gog-theme.c
+++ b/goffice/graph/gog-theme.c
@@ -496,27 +496,27 @@ _gog_themes_init (void)
/* graph */
style = go_style_new ();
- style->outline.dash_type = GO_LINE_NONE;
- style->outline.width = 0;
- style->outline.color = RGBA_BLACK;
+ style->line.dash_type = GO_LINE_NONE;
+ style->line.width = 0;
+ style->line.color = RGBA_BLACK;
style->fill.type = GO_STYLE_FILL_NONE;
go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
gog_theme_add_element (theme, style, NULL, "GogGraph", NULL);
/* chart */
style = go_style_new ();
- style->outline.dash_type = GO_LINE_SOLID;
- style->outline.width = 0; /* hairline */
- style->outline.color = RGBA_BLACK;
+ style->line.dash_type = GO_LINE_SOLID;
+ style->line.width = 0; /* hairline */
+ style->line.color = RGBA_BLACK;
style->fill.type = GO_STYLE_FILL_PATTERN;
go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
gog_theme_add_element (theme, style, NULL, "GogChart", NULL);
/* Legend */
style = go_style_new ();
- style->outline.dash_type = GO_LINE_SOLID;
- style->outline.width = 0; /* hairline */
- style->outline.color = RGBA_BLACK;
+ style->line.dash_type = GO_LINE_SOLID;
+ style->line.width = 0; /* hairline */
+ style->line.color = RGBA_BLACK;
style->fill.type = GO_STYLE_FILL_PATTERN;
go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
gog_theme_add_element (theme, style, NULL, "GogLegend", NULL);
@@ -536,22 +536,22 @@ _gog_themes_init (void)
/* Grid */
style = go_style_new ();
style->fill.type = GO_STYLE_FILL_PATTERN;
- style->outline.dash_type = GO_LINE_SOLID;
- style->outline.width = 1.;
- style->outline.color = 0X848284ff;
+ style->line.dash_type = GO_LINE_SOLID;
+ style->line.width = 1.;
+ style->line.color = 0X848284ff;
go_pattern_set_solid (&style->fill.pattern, RGBA_GREY (0xd0));
gog_theme_add_element (theme, style, NULL, "GogGrid", NULL);
/* GridLine */
style = go_style_new ();
- style->outline.dash_type = GO_LINE_SOLID;
+ style->line.dash_type = GO_LINE_SOLID;
style->line.width = 0.4;
style->line.color = RGBA_BLACK;
go_pattern_set_solid (&style->fill.pattern, RGBA_TO_UINT (0xE0, 0xE0, 0xE0, 0xE0));
style->fill.type = GO_STYLE_FILL_NONE;
gog_theme_add_element (theme, style, NULL, NULL, "MajorGrid");
style = go_style_new ();
- style->outline.dash_type = GO_LINE_SOLID;
+ style->line.dash_type = GO_LINE_SOLID;
style->line.width = 0.2;
style->line.color = RGBA_BLACK;
go_pattern_set_solid (&style->fill.pattern, RGBA_TO_UINT (0xE0, 0xE0, 0xE0, 0xE0));
@@ -560,9 +560,9 @@ _gog_themes_init (void)
/* Series */
style = go_style_new ();
- style->outline.dash_type = GO_LINE_SOLID;
- style->outline.width = 0; /* hairline */
- style->outline.color = RGBA_BLACK;
+ style->line.dash_type = GO_LINE_SOLID;
+ style->line.width = 0; /* hairline */
+ style->line.color = RGBA_BLACK;
style->fill.type = GO_STYLE_FILL_PATTERN;
/* FIXME : not really true, will want to split area from line */
gog_theme_add_element (theme, style,
@@ -570,9 +570,9 @@ _gog_themes_init (void)
/* Chart titles */
style = go_style_new ();
- style->outline.dash_type = GO_LINE_NONE;
- style->outline.width = 0.;
- style->outline.color = RGBA_BLACK;
+ style->line.dash_type = GO_LINE_NONE;
+ style->line.width = 0.;
+ style->line.color = RGBA_BLACK;
style->fill.type = GO_STYLE_FILL_NONE;
go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
go_style_set_font_desc (style, pango_font_description_from_string ("Sans Bold 12"));
@@ -580,9 +580,9 @@ _gog_themes_init (void)
/* labels */
style = go_style_new ();
- style->outline.dash_type = GO_LINE_NONE;
- style->outline.width = 0.;
- style->outline.color = RGBA_BLACK;
+ style->line.dash_type = GO_LINE_NONE;
+ style->line.width = 0.;
+ style->line.color = RGBA_BLACK;
style->fill.type = GO_STYLE_FILL_NONE;
go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
go_style_set_font_desc (style, pango_font_description_from_string ("Sans 10"));
@@ -600,9 +600,9 @@ _gog_themes_init (void)
/* regression equations */
style = go_style_new ();
- style->outline.dash_type = GO_LINE_SOLID;
- style->outline.width = 0; /* hairline */
- style->outline.color = RGBA_BLACK;
+ style->line.dash_type = GO_LINE_SOLID;
+ style->line.width = 0; /* hairline */
+ style->line.color = RGBA_BLACK;
style->fill.type = GO_STYLE_FILL_PATTERN;
go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
gog_theme_add_element (theme, style,
@@ -611,9 +611,9 @@ _gog_themes_init (void)
#ifdef GOFFICE_WITH_LASEM
/* Equations */
style = go_style_new ();
- style->outline.dash_type = GO_LINE_NONE;
- style->outline.width = 0; /* hairline */
- style->outline.color = RGBA_BLACK;
+ style->line.dash_type = GO_LINE_NONE;
+ style->line.width = 0; /* hairline */
+ style->line.color = RGBA_BLACK;
style->fill.type = GO_STYLE_FILL_NONE;
go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
go_style_set_font_desc (style, pango_font_description_from_string ("Sans 10"));
@@ -632,9 +632,9 @@ _gog_themes_init (void)
/* graph */
style = go_style_new ();
- style->outline.dash_type = GO_LINE_NONE;
- style->outline.width = 0;
- style->outline.color = RGBA_BLACK;
+ style->line.dash_type = GO_LINE_NONE;
+ style->line.width = 0;
+ style->line.color = RGBA_BLACK;
style->fill.type = GO_STYLE_FILL_GRADIENT;
style->fill.gradient.dir = GO_GRADIENT_N_TO_S;
style->fill.pattern.fore = RGBA_BLUE;
@@ -643,18 +643,18 @@ _gog_themes_init (void)
/* chart */
style = go_style_new ();
- style->outline.dash_type = GO_LINE_SOLID;
- style->outline.width = 0; /* hairline */
- style->outline.color = RGBA_BLACK;
+ style->line.dash_type = GO_LINE_SOLID;
+ style->line.width = 0; /* hairline */
+ style->line.color = RGBA_BLACK;
style->fill.type = GO_STYLE_FILL_PATTERN;
go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
gog_theme_add_element (theme, style, NULL, "GogChart", NULL);
/* legend */
style = go_style_new ();
- style->outline.dash_type = GO_LINE_SOLID;
- style->outline.width = 0; /* hairline */
- style->outline.color = RGBA_BLACK;
+ style->line.dash_type = GO_LINE_SOLID;
+ style->line.width = 0; /* hairline */
+ style->line.color = RGBA_BLACK;
style->fill.type = GO_STYLE_FILL_PATTERN;
go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
gog_theme_add_element (theme, style, NULL, "GogLegend", NULL);
@@ -676,9 +676,9 @@ _gog_themes_init (void)
/* Grid */
style = go_style_new ();
style->fill.type = GO_STYLE_FILL_PATTERN;
- style->outline.dash_type = GO_LINE_NONE;
- style->outline.color = RGBA_BLACK;
- style->outline.width = 0;
+ style->line.dash_type = GO_LINE_NONE;
+ style->line.color = RGBA_BLACK;
+ style->line.width = 0;
go_pattern_set_solid (&style->fill.pattern, RGBA_GREY (0xd0));
gog_theme_add_element (theme, style, NULL, "GogGrid", NULL);
@@ -700,9 +700,9 @@ _gog_themes_init (void)
/* series */
style = go_style_new ();
- style->outline.dash_type = GO_LINE_SOLID;
- style->outline.width = 0.; /* hairline */
- style->outline.color = RGBA_BLACK;
+ style->line.dash_type = GO_LINE_SOLID;
+ style->line.width = 0.; /* hairline */
+ style->line.color = RGBA_BLACK;
style->fill.type = GO_STYLE_FILL_PATTERN;
go_pattern_set_solid (&style->fill.pattern, RGBA_GREY (0x20));
/* FIXME : not really true, will want to split area from line */
@@ -711,9 +711,9 @@ _gog_themes_init (void)
/* labels */
style = go_style_new ();
- style->outline.dash_type = GO_LINE_NONE;
- style->outline.width = 0; /* none */
- style->outline.color = RGBA_BLACK;
+ style->line.dash_type = GO_LINE_NONE;
+ style->line.width = 0; /* none */
+ style->line.color = RGBA_BLACK;
style->fill.type = GO_STYLE_FILL_NONE;
go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
gog_theme_add_element (theme, style, NULL, "GogLabel", NULL);
@@ -730,9 +730,9 @@ _gog_themes_init (void)
/* regression equations */
style = go_style_new ();
- style->outline.dash_type = GO_LINE_SOLID;
- style->outline.width = 0; /* hairline */
- style->outline.color = RGBA_BLACK;
+ style->line.dash_type = GO_LINE_SOLID;
+ style->line.width = 0; /* hairline */
+ style->line.color = RGBA_BLACK;
style->fill.type = GO_STYLE_FILL_PATTERN;
go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
gog_theme_add_element (theme, style,
@@ -741,9 +741,9 @@ _gog_themes_init (void)
#ifdef GOFFICE_WITH_LASEM
/* Equations */
style = go_style_new ();
- style->outline.dash_type = GO_LINE_NONE;
- style->outline.width = 0; /* hairline */
- style->outline.color = RGBA_BLACK;
+ style->line.dash_type = GO_LINE_NONE;
+ style->line.width = 0; /* hairline */
+ style->line.color = RGBA_BLACK;
style->fill.type = GO_STYLE_FILL_NONE;
go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
go_style_set_font_desc (style, pango_font_description_from_string ("Sans 10"));
diff --git a/goffice/gtk/go-3d-rotation-sel.c b/goffice/gtk/go-3d-rotation-sel.c
index 7cb81dc..8e2d411 100644
--- a/goffice/gtk/go-3d-rotation-sel.c
+++ b/goffice/gtk/go-3d-rotation-sel.c
@@ -164,7 +164,7 @@ cb_rotation_changed (GO3DRotationSel *g3d)
style->fill.auto_back = FALSE;
/* set the background light blue or transparent */
style->fill.pattern.back = (i == 1)? RGBA_TO_UINT (0xad, 0xd8, 0xe6, 0xff): 0;
- style->outline.width = (mean_y < 0) ? 4. : 0.5;
+ style->line.width = (mean_y < 0) ? 4. : 0.5;
goc_item_set (g3d->cube_polygons[i], "points", points,
"style", style, NULL);
goc_points_unref (points);
@@ -208,26 +208,26 @@ cb_rotate_canvas_realize (GocCanvas *canvas, GO3DRotationSel *g3d)
g3d->cube_polygons[i] = goc_item_new (group,
GOC_TYPE_POLYGON, NULL);
go_style = go_styled_object_get_style (GO_STYLED_OBJECT (g3d->cube_polygons[i]));
- go_style->outline.auto_color = FALSE;
- go_style->outline.color = RGBA_BLACK;
- go_style->outline.miter_limit = 1.414;
+ go_style->line.auto_color = FALSE;
+ go_style->line.color = RGBA_BLACK;
+ go_style->line.miter_limit = 1.414;
}
g3d->dial = goc_item_new (group, GOC_TYPE_CIRCLE,
"x", mgn, "y", mgn, "radius", (double) g3d->radius, NULL);
go_style = go_styled_object_get_style (GO_STYLED_OBJECT (g3d->dial));
- go_style->outline.auto_color = FALSE;
- go_style->outline.color = RGBA_BLACK;
- go_style->outline.width = 2.;
+ go_style->line.auto_color = FALSE;
+ go_style->line.color = RGBA_BLACK;
+ go_style->line.width = 2.;
go_style->fill.auto_type = FALSE;
go_style->fill.type = GO_STYLE_FILL_NONE;
g3d->bank_dial = goc_item_new (group,
GOC_TYPE_CIRCLE, "radius", (double) g3d->bank_dial_r, NULL);
go_style = go_styled_object_get_style (GO_STYLED_OBJECT (g3d->bank_dial));
- go_style->outline.auto_color = FALSE;
- go_style->outline.color = RGBA_BLACK;
- go_style->outline.width = 3.;
+ go_style->line.auto_color = FALSE;
+ go_style->line.color = RGBA_BLACK;
+ go_style->line.width = 3.;
go_style->fill.auto_type = FALSE;
go_style->fill.type = GO_STYLE_FILL_PATTERN;
go_style->fill.auto_back = FALSE;
diff --git a/goffice/gtk/go-rotation-sel.c b/goffice/gtk/go-rotation-sel.c
index 6a812aa..3982899 100644
--- a/goffice/gtk/go-rotation-sel.c
+++ b/goffice/gtk/go-rotation-sel.c
@@ -120,15 +120,15 @@ cb_rotate_canvas_realize (GocCanvas *canvas, GORotationSel *grs)
"radius", size,
NULL);
go_style = go_styled_object_get_style (GO_STYLED_OBJECT (item));
- go_style->outline.width = 1.;
- go_style->outline.color = RGBA_BLACK;
+ go_style->line.width = 1.;
+ go_style->line.color = RGBA_BLACK;
go_style->fill.pattern.back = RGBA_BLACK;
grs->rotate_marks[i] = item;
}
grs->line = goc_item_new (group, GOC_TYPE_LINE, NULL);
go_style = go_styled_object_get_style (GO_STYLED_OBJECT (grs->line));
- go_style->outline.width = 2.;
- go_style->outline.color = RGBA_BLACK;
+ go_style->line.width = 2.;
+ go_style->line.color = RGBA_BLACK;
{
int w, h;
diff --git a/goffice/utils/go-style.c b/goffice/utils/go-style.c
index 1818595..964a2c3 100644
--- a/goffice/utils/go-style.c
+++ b/goffice/utils/go-style.c
@@ -159,7 +159,7 @@ go_style_set_image_preview (GOImage *pix, StylePrefState *state)
static void
cb_outline_dash_type_changed (GOSelector *selector, StylePrefState const *state)
{
- GOStyleLine *line = &state->style->outline;
+ GOStyleLine *line = &state->style->line;
line->dash_type = go_selector_get_active (selector, &line->auto_dash);
set_style (state);
@@ -172,7 +172,7 @@ cb_outline_size_changed (GtkAdjustment *adj, StylePrefState *state)
g_return_if_fail (style != NULL);
- style->outline.width = go_rint (adj->value * 100.) / 100.;
+ style->line.width = go_rint (adj->value * 100.) / 100.;
set_style (state);
}
@@ -184,8 +184,8 @@ cb_outline_color_changed (GOSelector *selector,
g_return_if_fail (style != NULL);
- style->outline.color = go_color_selector_get_color (selector,
- &style->outline.auto_color);
+ style->line.color = go_color_selector_get_color (selector,
+ &style->line.auto_color);
set_style (state);
}
@@ -207,20 +207,20 @@ outline_init (StylePrefState *state, gboolean enable, GOEditor *editor)
table = go_gtk_builder_get_widget (state->gui, "outline_table");
/* DashType */
- w = go_line_dash_selector_new (style->outline.dash_type,
- default_style->outline.dash_type);
+ w = go_line_dash_selector_new (style->line.dash_type,
+ default_style->line.dash_type);
gtk_table_attach (GTK_TABLE (table), w, 1, 3, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
g_signal_connect (G_OBJECT (w), "activate",
G_CALLBACK (cb_outline_dash_type_changed), state);
/* Size */
w = go_gtk_builder_get_widget (state->gui, "outline_size_spin");
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (w), style->outline.width);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (w), style->line.width);
g_signal_connect (gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (w)),
"value_changed",
G_CALLBACK (cb_outline_size_changed), state);
/* Color */
w = create_go_combo_color (state,
- style->outline.color, default_style->outline.color,
+ style->line.color, default_style->line.color,
state->gui,
"outline_color", "outline_color_label",
G_CALLBACK (cb_outline_color_changed));
@@ -1066,7 +1066,6 @@ go_style_assign (GOStyle *dst, GOStyle const *src)
if (dst->font.font != NULL)
go_font_unref (dst->font.font);
- dst->outline = src->outline;
dst->fill = src->fill;
dst->line = src->line;
if (dst->marker.mark)
@@ -1101,10 +1100,6 @@ go_style_apply_theme (GOStyle *dst, GOStyle const *src)
g_return_if_fail (GO_IS_STYLE (src));
g_return_if_fail (GO_IS_STYLE (dst));
- if (dst->outline.auto_dash)
- dst->outline.dash_type = src->outline.dash_type;
- if (dst->outline.auto_color)
- dst->outline.color = src->outline.color;
if (dst->fill.auto_type)
dst->fill.type = src->fill.type;
if (dst->fill.auto_fore)
@@ -1621,7 +1616,7 @@ go_style_persist_dom_load (GOPersist *gp, xmlNode *node)
if (xmlIsBlankNode (ptr) || ptr->name == NULL)
continue;
if (strcmp (ptr->name, "outline") == 0)
- go_style_line_load (ptr, &style->outline);
+ go_style_line_load (ptr, &style->line);
else if (strcmp (ptr->name, "line") == 0)
go_style_line_load (ptr, &style->line);
else if (strcmp (ptr->name, "fill") == 0)
@@ -1640,7 +1635,7 @@ static void
go_style_sax_load_line (GsfXMLIn *xin, xmlChar const **attrs)
{
GOStyle *style = GO_STYLE (xin->user_state);
- GOStyleLine *line = xin->node->user_data.v_int ? &style->outline : &style->line;
+ GOStyleLine *line = &style->line;
for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
if (0 == strcmp (attrs[0], "dash"))
@@ -1784,7 +1779,7 @@ go_style_persist_sax_save (GOPersist const *gp, GsfXMLOut *output)
G_OBJECT_TYPE_NAME (style));
if (style->interesting_fields & GO_STYLE_OUTLINE)
- go_style_line_sax_save (output, "outline", &style->outline);
+ go_style_line_sax_save (output, "outline", &style->line);
if (style->interesting_fields & GO_STYLE_LINE)
go_style_line_sax_save (output, "line", &style->line);
if (style->interesting_fields & GO_STYLE_FILL)
@@ -1867,8 +1862,7 @@ go_style_is_different_size (GOStyle const *a, GOStyle const *b)
{
if (a == NULL || b == NULL)
return TRUE;
- return a->outline.dash_type != b->outline.dash_type ||
- a->outline.width != b->outline.width ||
+ return a->line.dash_type != b->line.dash_type ||
a->line.width != b->line.width ||
a->fill.type != b->fill.type ||
a->text_layout.angle != b->text_layout.angle ||
@@ -1891,8 +1885,8 @@ go_style_is_outline_visible (GOStyle const *style)
g_return_val_if_fail (GO_IS_STYLE (style), FALSE);
/* FIXME FIXME FIXME make this smarter */
- return UINT_RGBA_A (style->outline.color) > 0 &&
- style->outline.dash_type != GO_LINE_NONE;
+ return UINT_RGBA_A (style->line.color) > 0 &&
+ style->line.dash_type != GO_LINE_NONE;
}
gboolean
@@ -1924,8 +1918,6 @@ go_style_force_auto (GOStyle *style)
style->marker.auto_shape =
style->marker.auto_outline_color =
style->marker.auto_fill_color =
- style->outline.auto_dash =
- style->outline.auto_color =
style->line.auto_dash =
style->line.auto_color =
style->fill.auto_type =
diff --git a/goffice/utils/go-style.h b/goffice/utils/go-style.h
index 8b5d2ed..064951e 100644
--- a/goffice/utils/go-style.h
+++ b/goffice/utils/go-style.h
@@ -88,7 +88,7 @@ struct _GOStyle {
GOStyleFlag interesting_fields;
GOStyleFlag disable_theming;
- union {GOStyleLine outline, line;};
+ GOStyleLine line;
struct {
GOStyleFill type;
gboolean auto_type;
diff --git a/plugins/plot_barcol/gog-dropbar.c b/plugins/plot_barcol/gog-dropbar.c
index f2247ad..72c4fcf 100644
--- a/plugins/plot_barcol/gog-dropbar.c
+++ b/plugins/plot_barcol/gog-dropbar.c
@@ -218,7 +218,7 @@ gog_dropbar_view_render (GogView *view, GogViewAllocation const *bbox)
continue;
prec_valid = FALSE;
neg_style = go_style_dup ((GOG_STYLED_OBJECT (series))->style);
- neg_style->outline.color ^= 0xffffff00;
+ neg_style->line.color ^= 0xffffff00;
neg_style->fill.pattern.back ^= 0xffffff00;
neg_style->fill.pattern.fore ^= 0xffffff00;
x = offset;
diff --git a/plugins/plot_distrib/gog-boxplot.c b/plugins/plot_distrib/gog-boxplot.c
index 33cb5b2..29709de 100644
--- a/plugins/plot_distrib/gog-boxplot.c
+++ b/plugins/plot_distrib/gog-boxplot.c
@@ -474,7 +474,6 @@ gog_box_plot_view_render (GogView *view, GogViewAllocation const *bbox)
if (model->outliers) {
double l1, l2, m1, m2, d, r = 2. * hrect * model->radius_ratio;
int i = 0;
- style->outline = style->line;
d = series->vals[3] - series->vals[1];
l1 = series->vals[1] - d * 1.5;
l2 = series->vals[1] - d * 3.;
@@ -630,7 +629,7 @@ gog_box_plot_series_init_style (GogStyledObject *gso, GOStyle *style)
{
((GogStyledObjectClass*) gog_box_plot_series_parent_klass)->init_style (gso, style);
- style->outline.dash_type = GO_LINE_NONE;
+ style->line.dash_type = GO_LINE_NONE;
}
static void
diff --git a/plugins/plot_pie/gog-pie.c b/plugins/plot_pie/gog-pie.c
index 310e04f..f8999f0 100644
--- a/plugins/plot_pie/gog-pie.c
+++ b/plugins/plot_pie/gog-pie.c
@@ -590,7 +590,7 @@ gog_pie_view_render (GogView *view, GogViewAllocation const *bbox)
separation_max = .0;
outline_width_max = .0;
if ((style = go_styled_object_get_style (GO_STYLED_OBJECT (series))))
- outline_width_max = gog_renderer_line_size (view->renderer, style->outline.width);
+ outline_width_max = gog_renderer_line_size (view->renderer, style->line.width);
for (overrides = gog_series_get_overrides (GOG_SERIES (series));
overrides != NULL;
overrides = overrides->next) {
@@ -598,8 +598,8 @@ gog_pie_view_render (GogView *view, GogViewAllocation const *bbox)
if (separation_max < separation)
separation_max = separation;
style = go_styled_object_get_style (GO_STYLED_OBJECT (overrides->data));
- if (outline_width_max < style->outline.width)
- outline_width_max = style->outline.width;
+ if (outline_width_max < style->line.width)
+ outline_width_max = style->line.width;
}
if (separation_max < -model->default_separation)
separation_max = -model->default_separation;
diff --git a/plugins/plot_surface/gog-contour.c b/plugins/plot_surface/gog-contour.c
index 84bb38b..b3098cc 100644
--- a/plugins/plot_surface/gog-contour.c
+++ b/plugins/plot_surface/gog-contour.c
@@ -469,7 +469,7 @@ gog_contour_view_render (GogView *view, GogViewAllocation const *bbox)
} while (k != r);
if (zmin == zmax) {
/* paint everything with one color*/
- style->outline.color = color[zmin];
+ style->line.color = color[zmin];
style->fill.pattern.back = color[zmin];
gog_renderer_push_style (rend, style);
go_path_move_to (path, x[0], y[0]);
@@ -516,7 +516,7 @@ gog_contour_view_render (GogView *view, GogViewAllocation const *bbox)
/* low values slices */
if (z[0] < zn) {
k = z[0];
- style->outline.color = color[k];
+ style->line.color = color[k];
style->fill.pattern.back = color[k];
k++;
go_path_move_to (path, x[0], y[0]);
@@ -536,7 +536,7 @@ gog_contour_view_render (GogView *view, GogViewAllocation const *bbox)
gog_renderer_pop_style (rend);
while (k < zn) {
- style->outline.color = color[k];
+ style->line.color = color[k];
style->fill.pattern.back = color[k];
k++;
go_path_move_to (path, xl[7], yl[7]);
@@ -562,7 +562,7 @@ gog_contour_view_render (GogView *view, GogViewAllocation const *bbox)
xl[0] = xl[7] = -1.;
if (z[2] < zn) {
k = z[2];
- style->outline.color = color[k];
+ style->line.color = color[k];
style->fill.pattern.back = color[k];
k++;
go_path_move_to (path, x[2], y[2]);
@@ -581,7 +581,7 @@ gog_contour_view_render (GogView *view, GogViewAllocation const *bbox)
go_path_clear (path);
gog_renderer_pop_style (rend);
while (k < zn) {
- style->outline.color = color[k];
+ style->line.color = color[k];
style->fill.pattern.back = color[k];
k++;
go_path_move_to (path, xl[3], yl[3]);
@@ -621,7 +621,7 @@ gog_contour_view_render (GogView *view, GogViewAllocation const *bbox)
yl[2] = y[1] + t * (y[2] - y[1]);
go_path_line_to (path, xl[2], yl[2]);
go_path_line_to (lines, xl[2], yl[2]);
- style->outline.color = color[k];
+ style->line.color = color[k];
style->fill.pattern.back = color[k];
gog_renderer_push_style (rend, style);
gog_renderer_fill_shape (rend, path);
@@ -643,7 +643,7 @@ gog_contour_view_render (GogView *view, GogViewAllocation const *bbox)
go_path_line_to (path, xl[2], yl[2]);
go_path_line_to (lines, xl[2], yl[2]);
go_path_line_to (path, xc, yc);
- style->outline.color = color[k];
+ style->line.color = color[k];
style->fill.pattern.back = color[k];
gog_renderer_push_style (rend, style);
gog_renderer_fill_shape (rend, path);
@@ -668,7 +668,7 @@ gog_contour_view_render (GogView *view, GogViewAllocation const *bbox)
yl[6] = y[3] + t * (y[0] - y[3]);
go_path_line_to (path, xl[6], yl[6]);
go_path_line_to (lines, xl[6], yl[6]);
- style->outline.color = color[k];
+ style->line.color = color[k];
style->fill.pattern.back = color[k];
gog_renderer_push_style (rend, style);
gog_renderer_fill_shape (rend, path);
@@ -690,7 +690,7 @@ gog_contour_view_render (GogView *view, GogViewAllocation const *bbox)
go_path_line_to (path, xl[6], yl[6]);
go_path_line_to (lines, xl[6], yl[6]);
go_path_line_to (path, xc, yc);
- style->outline.color = color[k];
+ style->line.color = color[k];
style->fill.pattern.back = color[k];
gog_renderer_push_style (rend, style);
gog_renderer_fill_shape (rend, path);
@@ -731,7 +731,7 @@ gog_contour_view_render (GogView *view, GogViewAllocation const *bbox)
go_path_line_to (path, xb[0], yb[0]);
if (xl[0] >= 0.)
go_path_line_to (path, xl[0], yl[0]);
- style->outline.color = color[zn];
+ style->line.color = color[zn];
style->fill.pattern.back = color[zn];
gog_renderer_push_style (rend, style);
gog_renderer_fill_shape (rend, path);
@@ -757,7 +757,7 @@ gog_contour_view_render (GogView *view, GogViewAllocation const *bbox)
go_path_line_to (path, xb[1], yb[1]);
if (xl[2] >= 0.)
go_path_line_to (path, xl[2], yl[2]);
- style->outline.color = color[zx];
+ style->line.color = color[zx];
style->fill.pattern.back = color[zx];
gog_renderer_push_style (rend, style);
gog_renderer_fill_shape (rend, path);
@@ -798,7 +798,7 @@ gog_contour_view_render (GogView *view, GogViewAllocation const *bbox)
go_path_line_to (path, xl[2], yl[2]);
if (xc >= 0.)
go_path_line_to (path, xc, yc);
- style->outline.color = color[zx];
+ style->line.color = color[zx];
style->fill.pattern.back = color[zx];
gog_renderer_push_style (rend, style);
gog_renderer_fill_shape (rend, path);
@@ -848,7 +848,7 @@ gog_contour_view_render (GogView *view, GogViewAllocation const *bbox)
go_path_line_to (path, xl[0], yl[0]);
if (xc >= 0.)
go_path_line_to (path, xc, yc);
- style->outline.color = color[zn];
+ style->line.color = color[zn];
style->fill.pattern.back = color[zn];
gog_renderer_push_style (rend, style);
gog_renderer_fill_shape (rend, path);
@@ -891,7 +891,7 @@ gog_contour_view_render (GogView *view, GogViewAllocation const *bbox)
} else
go_path_line_to (path, xl[s], yl[s]);
}
- style->outline.color = color[zn];
+ style->line.color = color[zn];
style->fill.pattern.back = color[zn];
gog_renderer_push_style (rend, style);
gog_renderer_fill_shape (rend, path);
@@ -911,7 +911,7 @@ gog_contour_view_render (GogView *view, GogViewAllocation const *bbox)
} else
go_path_line_to (path, xl[s], yl[s]);
}
- style->outline.color = color[zx];
+ style->line.color = color[zx];
style->fill.pattern.back = color[zx];
gog_renderer_push_style (rend, style);
gog_renderer_fill_shape (rend, path);
@@ -929,7 +929,7 @@ gog_contour_view_render (GogView *view, GogViewAllocation const *bbox)
s = 0;
r = kmax;
while (zmin < zmax) {
- style->outline.color = color[zmin];
+ style->line.color = color[zmin];
style->fill.pattern.back = color[zmin];
gog_renderer_push_style (rend, style);
while (z[k] <= zmin && k < kmax) {
@@ -1013,7 +1013,7 @@ gog_contour_view_render (GogView *view, GogViewAllocation const *bbox)
go_path_line_to (path, x[k], y[k]);
k++;
}
- style->outline.color = color[zmin];
+ style->line.color = color[zmin];
style->fill.pattern.back = color[zmin];
gog_renderer_push_style (rend, style);
gog_renderer_fill_shape (rend, path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]