[goffice] fixed auto chart styles
- From: Jean Bréfort <jbrefort src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [goffice] fixed auto chart styles
- Date: Thu, 3 Sep 2009 09:32:38 +0000 (UTC)
commit 97e7d4763c10c615fa7b05ee1f94d5ed44ac8459
Author: Jean Brefort <jean brefort normalesup org>
Date: Thu Sep 3 11:24:54 2009 +0200
fixed auto chart styles
ChangeLog | 33 +++++++++++++++++++++++
goffice/graph/gog-axis-line.c | 2 +-
goffice/graph/gog-axis.c | 3 +-
goffice/graph/gog-equation.c | 3 +-
goffice/graph/gog-graph.c | 2 +-
goffice/graph/gog-grid.c | 2 +-
goffice/graph/gog-label.c | 5 ++-
goffice/graph/gog-legend.c | 3 +-
goffice/graph/gog-plot.c | 2 +-
goffice/graph/gog-reg-curve.c | 2 +-
goffice/graph/gog-series-lines.c | 2 +-
goffice/graph/gog-series.c | 6 +++-
goffice/graph/gog-smoothed-curve.c | 2 +-
goffice/graph/gog-styled-object.c | 2 +-
goffice/graph/gog-theme.c | 20 +++++++++-----
goffice/graph/gog-theme.h | 2 +-
goffice/utils/go-style.c | 50 +++++++++++++++++++++---------------
goffice/utils/go-style.h | 2 +-
plugins/plot_barcol/gog-line.c | 2 +-
plugins/plot_distrib/gog-boxplot.c | 10 -------
plugins/plot_pie/gog-pie.c | 2 +-
plugins/plot_surface/gog-contour.c | 6 ++--
plugins/plot_xy/gog-xy.c | 4 +-
23 files changed, 105 insertions(+), 62 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ed7073b..bc17c4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,36 @@
+2009-09-03 Jean Brefort <jean brefort normalesup org>
+
+ * goffice/graph/gog-axis-line.c (gog_axis_base_init_style): fixed some
+ issues with auto styles.
+ * goffice/graph/gog-axis.c (gog_axis_init_style): ditto.
+ * goffice/graph/gog-equation.c (gog_equation_init_style): ditto.
+ * goffice/graph/gog-graph.c (gog_graph_init): ditto.
+ * goffice/graph/gog-grid.c (gog_grid_init_style): ditto.
+ * goffice/graph/gog-label.c (gog_text_init_style): ditto.
+ * goffice/graph/gog-legend.c (gog_legend_init_style): ditto.
+ * goffice/graph/gog-plot.c (gog_plot_foreach_elem): ditto.
+ * goffice/graph/gog-reg-curve.c (gog_reg_curve_init_style): ditto.
+ * goffice/graph/gog-series-lines.c (gog_series_lines_init_style): ditto.
+ * goffice/graph/gog-series.c (gog_series_element_init_style),
+ (gog_series_init_style): ditto.
+ * goffice/graph/gog-smoothed-curve.c
+ (gog_smoothed_curve_init_style): ditto.
+ * goffice/graph/gog-styled-object.c
+ (gog_styled_object_parent_changed): ditto.
+ * goffice/graph/gog-theme.c (gog_theme_fillin_style): ditto.
+ * goffice/graph/gog-theme.h: ditto.
+ * goffice/utils/go-style.c (go_style_apply_theme): ditto.
+ * goffice/utils/go-style.h: ditto.
+ * plugins/plot_barcol/gog-line.c
+ (gog_line_series_element_init_style): ditto.
+ * plugins/plot_distrib/gog-boxplot.c
+ (gog_box_plot_series_class_init): ditto.
+ * plugins/plot_pie/gog-pie.c (gog_pie_view_render): ditto.
+ * plugins/plot_surface/gog-contour.c
+ (gog_contour_plot_foreach_elem), (gog_contour_view_render): ditto.
+ * plugins/plot_xy/gog-xy.c (gog_xy_view_render),
+ (gog_xy_series_element_init_style): ditto.
+
2009-09-01 Jean Brefort <jean brefort normalesup org>
* goffice/app/go-plugin-service-impl.h: renamed GPS to GO_PLUGIN_SERVICE
diff --git a/goffice/graph/gog-axis-line.c b/goffice/graph/gog-axis-line.c
index 40a59e2..7bbda27 100644
--- a/goffice/graph/gog-axis-line.c
+++ b/goffice/graph/gog-axis-line.c
@@ -645,7 +645,7 @@ gog_axis_base_init_style (GogStyledObject *gso, GOStyle *style)
{
style->interesting_fields = GO_STYLE_LINE | GO_STYLE_FONT;
gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
- style, GOG_OBJECT (gso), 0, FALSE);
+ style, GOG_OBJECT (gso), 0, GO_STYLE_LINE | GO_STYLE_FONT);
}
static void
diff --git a/goffice/graph/gog-axis.c b/goffice/graph/gog-axis.c
index 99c5689..70f9c81 100644
--- a/goffice/graph/gog-axis.c
+++ b/goffice/graph/gog-axis.c
@@ -2386,7 +2386,8 @@ gog_axis_init_style (GogStyledObject *gso, GOStyle *style)
else
style->interesting_fields = 0;
gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
- style, GOG_OBJECT (gso), 0, FALSE);
+ style, GOG_OBJECT (gso), 0, GO_STYLE_LINE |
+ GO_STYLE_FONT | GO_STYLE_TEXT_LAYOUT);
}
static void
diff --git a/goffice/graph/gog-equation.c b/goffice/graph/gog-equation.c
index aea0b36..730b15d 100644
--- a/goffice/graph/gog-equation.c
+++ b/goffice/graph/gog-equation.c
@@ -293,7 +293,8 @@ gog_equation_init_style (GogStyledObject *gso, GOStyle *style)
GO_STYLE_FONT;
gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
- style, GOG_OBJECT (gso), 0, FALSE);
+ style, GOG_OBJECT (gso), 0, GO_STYLE_OUTLINE |
+ GO_STYLE_FILL | GO_STYLE_FONT);
}
static void
diff --git a/goffice/graph/gog-graph.c b/goffice/graph/gog-graph.c
index 1750a73..28a4349 100644
--- a/goffice/graph/gog-graph.c
+++ b/goffice/graph/gog-graph.c
@@ -384,7 +384,7 @@ gog_graph_init (GogGraph *graph)
* support graphs in graphs */
GOG_OBJECT (graph)->user_name = g_strdup (_("Graph"));
gog_theme_fillin_style (graph->theme,
- gso->style, GOG_OBJECT (graph), 0, TRUE);
+ gso->style, GOG_OBJECT (graph), 0, GO_STYLE_FILL | GO_STYLE_OUTLINE);
go_styled_object_apply_theme (GO_STYLED_OBJECT (gso), gso->style);
graph->data_refs = g_hash_table_new (g_direct_hash, g_direct_equal);
diff --git a/goffice/graph/gog-grid.c b/goffice/graph/gog-grid.c
index 685b94d..5f78f51 100644
--- a/goffice/graph/gog-grid.c
+++ b/goffice/graph/gog-grid.c
@@ -61,7 +61,7 @@ gog_grid_init_style (GogStyledObject *gso, GOStyle *style)
{
style->interesting_fields = GO_STYLE_FILL | GO_STYLE_OUTLINE;
gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
- style, GOG_OBJECT (gso), 0, FALSE);
+ style, GOG_OBJECT (gso), 0, GO_STYLE_FILL | GO_STYLE_OUTLINE);
}
GogGridType
diff --git a/goffice/graph/gog-label.c b/goffice/graph/gog-label.c
index 4b77198..e18dbef 100644
--- a/goffice/graph/gog-label.c
+++ b/goffice/graph/gog-label.c
@@ -92,10 +92,11 @@ gog_text_init_style (GogStyledObject *gso, GOStyle *style)
{
GogObject *parent;
- style->interesting_fields = GO_STYLE_OUTLINE | GO_STYLE_FILL |
+ style->interesting_fields = GO_STYLE_OUTLINE | GO_STYLE_FILL |
GO_STYLE_FONT | GO_STYLE_TEXT_LAYOUT;
gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
- style, GOG_OBJECT (gso), 0, FALSE);
+ style, GOG_OBJECT (gso), 0, GO_STYLE_OUTLINE | GO_STYLE_FILL |
+ GO_STYLE_FONT | GO_STYLE_TEXT_LAYOUT);
/* Kludge for default Y axis title orientation. This should have be done
* in GogTheme, but it's not possible without breaking graph persistence
diff --git a/goffice/graph/gog-legend.c b/goffice/graph/gog-legend.c
index 7ed8aae..9ccfd72 100644
--- a/goffice/graph/gog-legend.c
+++ b/goffice/graph/gog-legend.c
@@ -176,7 +176,8 @@ gog_legend_init_style (GogStyledObject *gso, GOStyle *style)
{
style->interesting_fields = GO_STYLE_OUTLINE | GO_STYLE_FILL | GO_STYLE_FONT;
gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
- style, GOG_OBJECT (gso), 0, FALSE);
+ style, GOG_OBJECT (gso), 0, GO_STYLE_OUTLINE | GO_STYLE_FILL |
+ GO_STYLE_FONT);
}
static void
diff --git a/goffice/graph/gog-plot.c b/goffice/graph/gog-plot.c
index 54fe451..c31ac10 100644
--- a/goffice/graph/gog-plot.c
+++ b/goffice/graph/gog-plot.c
@@ -769,7 +769,7 @@ gog_plot_foreach_elem (GogPlot *plot, gboolean only_visible,
tmp_style = style;
gog_theme_fillin_style (theme, tmp_style, GOG_OBJECT (series),
- plot->index_num + i, FALSE);
+ plot->index_num + i, tmp_style->interesting_fields);
if (labels != NULL)
label = (i < num_labels) ? go_data_get_vector_string (labels, i) : g_strdup ("");
else
diff --git a/goffice/graph/gog-reg-curve.c b/goffice/graph/gog-reg-curve.c
index 2296952..d5e0bd0 100644
--- a/goffice/graph/gog-reg-curve.c
+++ b/goffice/graph/gog-reg-curve.c
@@ -41,7 +41,7 @@ gog_reg_curve_init_style (GogStyledObject *gso, GOStyle *style)
{
style->interesting_fields = GO_STYLE_LINE;
gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
- style, GOG_OBJECT (gso), 0, FALSE);
+ style, GOG_OBJECT (gso), 0, GO_STYLE_LINE);
}
#ifdef GOFFICE_WITH_GTK
diff --git a/goffice/graph/gog-series-lines.c b/goffice/graph/gog-series-lines.c
index 72d8695..c4dd884 100644
--- a/goffice/graph/gog-series-lines.c
+++ b/goffice/graph/gog-series-lines.c
@@ -39,7 +39,7 @@ gog_series_lines_init_style (GogStyledObject *gso, GOStyle *style)
? GO_STYLE_LINE | GO_STYLE_MARKER
: GO_STYLE_LINE;
gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
- style, GOG_OBJECT (gso), 0, FALSE);
+ style, GOG_OBJECT (gso), 0, style->interesting_fields);
}
static void
diff --git a/goffice/graph/gog-series.c b/goffice/graph/gog-series.c
index ac33541..4d0cb12 100644
--- a/goffice/graph/gog-series.c
+++ b/goffice/graph/gog-series.c
@@ -184,7 +184,8 @@ gog_series_element_init_style (GogStyledObject *gso, GOStyle *style)
parent_style = go_styled_object_get_style (GO_STYLED_OBJECT (series));
style->interesting_fields = parent_style->interesting_fields;
gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
- style, GOG_OBJECT (gso), GOG_SERIES_ELEMENT (gso)->index, FALSE);
+ style, GOG_OBJECT (gso), GOG_SERIES_ELEMENT (gso)->index,
+ style->interesting_fields);
}
static void
@@ -607,7 +608,8 @@ gog_series_init_style (GogStyledObject *gso, GOStyle *style)
GogSeries const *series = (GogSeries const *)gso;
style->interesting_fields = series->plot->desc.series.style_fields;
gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
- style, GOG_OBJECT (gso), series->index, FALSE);
+ style, GOG_OBJECT (gso), series->index,
+ style->interesting_fields);
}
static void
diff --git a/goffice/graph/gog-smoothed-curve.c b/goffice/graph/gog-smoothed-curve.c
index 6be7ac4..3dc5496 100644
--- a/goffice/graph/gog-smoothed-curve.c
+++ b/goffice/graph/gog-smoothed-curve.c
@@ -34,7 +34,7 @@ gog_smoothed_curve_init_style (GogStyledObject *gso, GOStyle *style)
{
style->interesting_fields = GO_STYLE_LINE;
gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
- style, GOG_OBJECT (gso), 0, FALSE);
+ style, GOG_OBJECT (gso), 0, GO_STYLE_LINE);
}
static void
diff --git a/goffice/graph/gog-styled-object.c b/goffice/graph/gog-styled-object.c
index b71df92..c2621d3 100644
--- a/goffice/graph/gog-styled-object.c
+++ b/goffice/graph/gog-styled-object.c
@@ -151,7 +151,7 @@ gog_styled_object_parent_changed (GogObject *obj, gboolean was_set)
if (was_set) {
GogStyledObject *gso = GOG_STYLED_OBJECT (obj);
gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
- gso->style, GOG_OBJECT (gso), 0, TRUE);
+ gso->style, GOG_OBJECT (gso), 0, GO_STYLE_ALL);
go_styled_object_apply_theme (GO_STYLED_OBJECT (gso), gso->style);
}
gog_object_klass->parent_changed (obj, was_set);
diff --git a/goffice/graph/gog-theme.c b/goffice/graph/gog-theme.c
index 5a66d68..5f5b851 100644
--- a/goffice/graph/gog-theme.c
+++ b/goffice/graph/gog-theme.c
@@ -204,31 +204,37 @@ gog_theme_find_element (GogTheme const *theme, GogObject const *obj)
* @style: #GOStyle to initialize
* @obj: #GogObject The object associated with @style
* @ind: an optional index
- * @complete_overwrite: boolean
+ * @relevant_fields: GOStyleFlag
*
* Fill in the auto aspects of @style based on @theme 's element for objects of
- * type/role similar to @obj with index @ind. If @complete_overwrite is used,
- * fillin the entire style, not just the auto portions.
+ * type/role similar to @obj with index @ind. If @relevant_fields is GO_STYLE_ALL,
+ * fillin the entire style, not just the auto portions included in @relevant_fields.
**/
void
gog_theme_fillin_style (GogTheme const *theme,
GOStyle *style,
GogObject const *obj,
int ind,
- gboolean complete_overwrite)
+ GOStyleFlag relevant_fields)
{
GogThemeElement *elem = gog_theme_find_element (theme, obj);
g_return_if_fail (elem != NULL);
- if (complete_overwrite)
+ if (relevant_fields == GO_STYLE_ALL)
go_style_assign (style, elem->style);
else
- go_style_apply_theme (style, elem->style);
+ go_style_apply_theme (style, elem->style, relevant_fields);
/* FIXME FIXME FIXME we should handle the applicability here not in the map */
- if (ind >= 0 && elem->map)
+ /* ensure only relevant fields are changed */
+ if (ind >= 0 && elem->map) {
+ /* ensure only relevant fields are changed */
+ GOStyleFlag flags = style->disable_theming;
+ style->disable_theming = GO_STYLE_ALL ^ relevant_fields;
(elem->map) (style, ind);
+ style->disable_theming = flags;
+ }
}
GogTheme *
diff --git a/goffice/graph/gog-theme.h b/goffice/graph/gog-theme.h
index cf937ce..00e985d 100644
--- a/goffice/graph/gog-theme.h
+++ b/goffice/graph/gog-theme.h
@@ -36,7 +36,7 @@ GogTheme *gog_theme_new_from_file (char const *name, char const *file);
char const *gog_theme_get_name (GogTheme const *theme);
void gog_theme_fillin_style (GogTheme const *theme, GOStyle *style,
GogObject const *obj, int ind,
- gboolean complete_overwrite);
+ GOStyleFlag relevant_fields);
void gog_theme_registry_add (GogTheme *theme, gboolean is_default);
GogTheme *gog_theme_registry_lookup (char const *name);
diff --git a/goffice/utils/go-style.c b/goffice/utils/go-style.c
index 80de8d1..ba92707 100644
--- a/goffice/utils/go-style.c
+++ b/goffice/utils/go-style.c
@@ -1092,7 +1092,7 @@ go_style_assign (GOStyle *dst, GOStyle const *src)
* assigned (is_auto)
**/
void
-go_style_apply_theme (GOStyle *dst, GOStyle const *src)
+go_style_apply_theme (GOStyle *dst, GOStyle const *src, GOStyleFlag fields)
{
if (src == dst)
return;
@@ -1100,26 +1100,34 @@ 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->fill.auto_type)
- dst->fill.type = src->fill.type;
- if (dst->fill.auto_fore)
- dst->fill.pattern.fore = src->fill.pattern.fore;
- if (dst->fill.auto_back)
- dst->fill.pattern.back = src->fill.pattern.back;
- if (dst->line.auto_dash)
- dst->line.dash_type = src->line.dash_type;
- if (dst->line.auto_color)
- dst->line.color = src->line.color;
- if (dst->marker.auto_shape)
- go_marker_set_shape (dst->marker.mark,
- go_marker_get_shape (src->marker.mark));
- if (dst->marker.auto_outline_color)
- go_marker_set_outline_color (dst->marker.mark,
- go_marker_get_outline_color (src->marker.mark));
- if (dst->marker.auto_fill_color)
- go_marker_set_fill_color (dst->marker.mark,
- go_marker_get_fill_color (src->marker.mark));
- if (dst->text_layout.auto_angle)
+ if (fields & GO_STYLE_FILL) {
+ if (dst->fill.auto_type)
+ dst->fill.type = src->fill.type;
+ if (dst->fill.auto_fore)
+ dst->fill.pattern.fore = src->fill.pattern.fore;
+ if (dst->fill.auto_back)
+ dst->fill.pattern.back = src->fill.pattern.back;
+ }
+
+ if (fields & (GO_STYLE_LINE | GO_STYLE_OUTLINE)) {
+ if (dst->line.auto_dash)
+ dst->line.dash_type = src->line.dash_type;
+ if (dst->line.auto_color)
+ dst->line.color = src->line.color;
+ }
+ if (fields & GO_STYLE_MARKER) {
+ if (dst->marker.auto_shape)
+ go_marker_set_shape (dst->marker.mark,
+ go_marker_get_shape (src->marker.mark));
+ if (dst->marker.auto_outline_color)
+ go_marker_set_outline_color (dst->marker.mark,
+ go_marker_get_outline_color (src->marker.mark));
+ if (dst->marker.auto_fill_color)
+ go_marker_set_fill_color (dst->marker.mark,
+ go_marker_get_fill_color (src->marker.mark));
+ }
+
+ if ((fields & GO_STYLE_TEXT_LAYOUT) && dst->text_layout.auto_angle)
dst->text_layout.angle = src->text_layout.angle;
#if 0
diff --git a/goffice/utils/go-style.h b/goffice/utils/go-style.h
index 064951e..2166cf7 100644
--- a/goffice/utils/go-style.h
+++ b/goffice/utils/go-style.h
@@ -121,7 +121,7 @@ struct _GOStyle {
GOStyle *go_style_new (void);
GOStyle *go_style_dup (GOStyle const *style);
void go_style_assign (GOStyle *dst, GOStyle const *src);
-void go_style_apply_theme (GOStyle *dst, GOStyle const *src);
+void go_style_apply_theme (GOStyle *dst, GOStyle const *src, GOStyleFlag fields);
GOMarker const *go_style_get_marker (GOStyle *style);
void go_style_set_marker (GOStyle *style, GOMarker *marker);
diff --git a/plugins/plot_barcol/gog-line.c b/plugins/plot_barcol/gog-line.c
index 1763731..4d37749 100644
--- a/plugins/plot_barcol/gog-line.c
+++ b/plugins/plot_barcol/gog-line.c
@@ -70,7 +70,7 @@ gog_line_series_element_init_style (GogStyledObject *gso, GOStyle *style)
style->interesting_fields = GO_STYLE_MARKER;
gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
- style, GOG_OBJECT (gso), GOG_SERIES_ELEMENT (gso)->index, FALSE);
+ style, GOG_OBJECT (gso), GOG_SERIES_ELEMENT (gso)->index, GO_STYLE_MARKER);
}
static void
diff --git a/plugins/plot_distrib/gog-boxplot.c b/plugins/plot_distrib/gog-boxplot.c
index 29709de..e1d47cc 100644
--- a/plugins/plot_distrib/gog-boxplot.c
+++ b/plugins/plot_distrib/gog-boxplot.c
@@ -625,14 +625,6 @@ gog_box_plot_series_update (GogObject *obj)
}
static void
-gog_box_plot_series_init_style (GogStyledObject *gso, GOStyle *style)
-{
- ((GogStyledObjectClass*) gog_box_plot_series_parent_klass)->init_style (gso, style);
-
- style->line.dash_type = GO_LINE_NONE;
-}
-
-static void
gog_box_plot_series_finalize (GObject *obj)
{
g_free (GOG_BOX_PLOT_SERIES (obj)->svals);
@@ -643,12 +635,10 @@ static void
gog_box_plot_series_class_init (GogObjectClass *obj_klass)
{
GObjectClass *object_class = (GObjectClass *) obj_klass;
- GogStyledObjectClass *gso_klass = (GogStyledObjectClass*) obj_klass;
gog_box_plot_series_parent_klass = g_type_class_peek_parent (obj_klass);
object_class->finalize = gog_box_plot_series_finalize;
obj_klass->update = gog_box_plot_series_update;
- gso_klass->init_style = gog_box_plot_series_init_style;
}
GSF_DYNAMIC_CLASS (GogBoxPlotSeries, gog_box_plot_series,
diff --git a/plugins/plot_pie/gog-pie.c b/plugins/plot_pie/gog-pie.c
index f8999f0..dffbea3 100644
--- a/plugins/plot_pie/gog-pie.c
+++ b/plugins/plot_pie/gog-pie.c
@@ -750,7 +750,7 @@ gog_pie_view_render (GogView *view, GogViewAllocation const *bbox)
GO_STYLED_OBJECT (gpse)));
} else if (model->base.vary_style_by_element)
gog_theme_fillin_style (theme, style, GOG_OBJECT (series),
- model->base.index_num + k, FALSE);
+ model->base.index_num + k, GO_STYLE_FILL);
/* only separate the outer ring */
separated_cx = cx;
diff --git a/plugins/plot_surface/gog-contour.c b/plugins/plot_surface/gog-contour.c
index 4994800..97924fd 100644
--- a/plugins/plot_surface/gog-contour.c
+++ b/plugins/plot_surface/gog-contour.c
@@ -158,7 +158,7 @@ gog_contour_plot_foreach_elem (GogPlot *plot, gboolean only_visible,
if (j < 2)
color[0] = GO_RGBA_WHITE;
else for (i = 0; i < j; i++) {
- gog_theme_fillin_style (theme, style, GOG_OBJECT (plot->series->data), i, FALSE);
+ gog_theme_fillin_style (theme, style, GOG_OBJECT (plot->series->data), i, style->interesting_fields);
color[i] = style->fill.pattern.back;
}
g_object_unref (style);
@@ -178,7 +178,7 @@ gog_contour_plot_foreach_elem (GogPlot *plot, gboolean only_visible,
g_free (label);
}
if (limits[i - j] > minimum) {
- gog_theme_fillin_style (theme, style, GOG_OBJECT (plot->series->data), i, FALSE);
+ gog_theme_fillin_style (theme, style, GOG_OBJECT (plot->series->data), i, style->interesting_fields);
label = g_strdup_printf ("[%g%s %g]", minimum, separator,
limits[i - j]);
(func) (i, style, label, data);
@@ -334,7 +334,7 @@ gog_contour_view_render (GogView *view, GogViewAllocation const *bbox)
if (max < 2)
color[0] = GO_RGBA_WHITE;
else for (i = 0; i < (unsigned) max; i++) {
- gog_theme_fillin_style (theme, style, GOG_OBJECT (series), i, FALSE);
+ gog_theme_fillin_style (theme, style, GOG_OBJECT (series), i, style->interesting_fields);
color[i] = style->fill.pattern.back;
}
g_object_unref (style);
diff --git a/plugins/plot_xy/gog-xy.c b/plugins/plot_xy/gog-xy.c
index 897ad54..3878c33 100644
--- a/plugins/plot_xy/gog-xy.c
+++ b/plugins/plot_xy/gog-xy.c
@@ -1178,7 +1178,7 @@ gog_xy_view_render (GogView *view, GogViewAllocation const *bbox)
GO_STYLED_OBJECT (gse)));
} else if (model->base.vary_style_by_element)
gog_theme_fillin_style (theme, style, GOG_OBJECT (series),
- model->base.index_num + i - 1, FALSE);
+ model->base.index_num + i - 1, style->interesting_fields);
gog_renderer_draw_circle (view->renderer, x_canvas, y_canvas,
((size_as_area) ?
sqrt (z / zmax) :
@@ -1420,7 +1420,7 @@ gog_xy_series_element_init_style (GogStyledObject *gso, GOStyle *style)
else
style->interesting_fields = parent_style->interesting_fields;
gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
- style, GOG_OBJECT (gso), GOG_SERIES_ELEMENT (gso)->index, FALSE);
+ style, GOG_OBJECT (gso), GOG_SERIES_ELEMENT (gso)->index, style->interesting_fields);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]