Commit 1fb36382 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

http://bugzilla.gnome.org/show_bug.cgi?id=121873 g_string_append (str,


2003-09-09  Jody Goldberg <jody@gnome.org>

	http://bugzilla.gnome.org/show_bug.cgi?id=121873
	* src/format.c (style_format_number) : g_string_append (str, str->str)
          is a bad idea.
	(style_format_delocalize) : handle "" cleanly.
	* src/formats.c (cell_format_classify) : ditto.

2003-09-09  Jody Goldberg <jody@gnome.org>

	* graph/gog-renderer.h : Add an anchor parm to draw_text and clean up
	  the semantics of size.

	* graph/gog-renderer-pixbuf.c (gog_renderer_pixbuf_draw_text) : handle
	  the various anchor types.

	* graph/gog-axis.c : Some initial work at generating bounds, and
	  drawing axis values.

	* graph/gog-view.c (gog_view_render) : filter objects with invalid
	  size.  eg a user makes the plot too small to be useful.

2003-09-09  Jody Goldberg <jody@gnome.org>

	* graph/plugins/plot_barcol/gog-1.5d.c (gog_plot1_5d_update) :
	  percentage charts logicly limit -1 .. 1

	* graph/plugins/plot_xy/gog-xy.c (gog_xy_plot_update) : no logical min
	  or max.

2003-09-08  Jody Goldberg <jody@gnome.org>

	* graph/plugins/plot_barcol/plot-types.xml.in : fix icons to match
	  reality.  All lines currently have markers by default.

	* graph/plugins/plot_barcol/gog-line.c
	(gog_line_update_stacked_and_percentage) : Generate the correct bounds.

	* graph/plugins/plot_barcol/gog-barcol.c
	(gog_barcol_update_stacked_and_percentage) : Why special case 0..1
	(gog_barcol_view_render) : handle bound clipping.
parent 256306ad
2003-09-09 Jody Goldberg <jody@gnome.org>
* graph/gog-renderer.h : Add an anchor parm to draw_text and clean up
the semantics of size.
* graph/gog-renderer-pixbuf.c (gog_renderer_pixbuf_draw_text) : handle
the various anchor types.
* graph/gog-axis.c : Some initial work at generating bounds, and
drawing axis values.
* graph/gog-view.c (gog_view_render) : filter objects with invalid
size. eg a user makes the plot too small to be useful.
2003-09-09 Jody Goldberg <jody@gnome.org>
* graph/plugins/plot_barcol/gog-1.5d.c (gog_plot1_5d_update) :
percentage charts logicly limit -1 .. 1
* graph/plugins/plot_xy/gog-xy.c (gog_xy_plot_update) : no logical min
or max.
2003-09-08 Jody Goldberg <jody@gnome.org>
* graph/plugins/plot_barcol/plot-types.xml.in : fix icons to match
......
......@@ -34,6 +34,7 @@
#include <gsf/gsf-impl-utils.h>
#include <src/gnumeric-i18n.h>
#include <src/gui-util.h>
#include <src/mathfunc.h>
#include <gtk/gtktable.h>
#include <gtk/gtkcheckbutton.h>
#include <glade/glade-xml.h>
......@@ -56,7 +57,9 @@ struct _GogAxis {
GogDatasetElement source [AXIS_ELEM_LAST_ENTRY];
GogAxisTickLevel tick_level;
double bound_min, bound_max, bound_step;
double min_val, max_val;
double logical_min_val, logical_max_val;
gpointer min_contrib, max_contrib; /* NULL means use the manual sources */
};
......@@ -158,11 +161,53 @@ gog_axis_update (GogObject *obj)
{
GSList *ptr;
GogAxis *axis = GOG_AXIS (obj);
double minima, maxima, logical_min, logical_max;
double range, step;
gog_debug (0, g_warning ("axis::update"););
axis->min_val = DBL_MAX;
axis->max_val = DBL_MIN;
axis->min_contrib = axis->max_contrib = NULL;
for (ptr = axis->contributors ; ptr != NULL ; ptr = ptr->next) {
gog_plot_get_axis_bounds (GOG_PLOT (ptr->data), axis->type,
&minima, &maxima, &logical_min, &logical_max);
if (axis->min_val > minima) {
axis->min_val = minima;
axis->logical_min_val = logical_min;
axis->min_contrib = ptr->data;
} else if (axis->min_contrib == ptr->data) {
axis->min_contrib = NULL;
axis->min_val = minima;
}
if (axis->max_val < maxima) {
axis->max_val = maxima;
axis->logical_max_val = logical_max;
axis->max_contrib = ptr->data;
} else if (axis->max_contrib == ptr->data) {
axis->max_contrib = NULL;
axis->max_val = maxima;
}
}
minima = axis->min_val;
maxima = axis->max_val;
range = fabs (maxima - minima);
if (gnumeric_sub_epsilon (range) < 0.) {
minima *= .9;
maxima *= 1.1;
range = fabs (maxima - minima);
}
step = pow (10, gnumeric_fake_trunc (log10 (range)));
if (range/step < 3)
step /= 5.;
/* we want the bounds to be loose so jump up a step if we get too close */
axis->bound_min = step * floor (gnumeric_sub_epsilon (minima/step));
axis->bound_max = step * ceil (gnumeric_add_epsilon (maxima/step));
axis->bound_step = step;
}
static void
......@@ -341,12 +386,12 @@ gog_axis_get_pos (GogAxis const *axis)
}
gboolean
gog_axis_get_bounds (GogAxis const *axis, double *min_val, double *max_val)
gog_axis_get_bounds (GogAxis const *axis, double *min_bound, double *max_bound)
{
g_return_val_if_fail (GOG_AXIS (axis) != NULL, FALSE);
*min_val = axis->min_val;
*max_val = axis->max_val;
*min_bound = axis->bound_min;
*max_bound = axis->bound_max;
return TRUE;
}
......@@ -365,6 +410,8 @@ gog_axis_add_contributor (GogAxis *axis, GogObject *contrib)
g_return_if_fail (g_slist_find (axis->contributors, contrib) == NULL);
axis->contributors = g_slist_prepend (axis->contributors, contrib);
gog_object_request_update (GOG_OBJECT (axis));
}
/**
......@@ -377,10 +424,23 @@ gog_axis_add_contributor (GogAxis *axis, GogObject *contrib)
void
gog_axis_del_contributor (GogAxis *axis, GogObject *contrib)
{
gboolean update = FALSE;
g_return_if_fail (GOG_AXIS (axis) != NULL);
g_return_if_fail (g_slist_find (axis->contributors, contrib) != NULL);
if (axis->min_contrib == contrib) {
axis->min_contrib = NULL;
update = TRUE;
}
if (axis->max_contrib == contrib) {
axis->max_contrib = NULL;
update = TRUE;
}
axis->contributors = g_slist_remove (axis->contributors, contrib);
if (update)
gog_object_request_update (GOG_OBJECT (axis));
}
void
......@@ -410,36 +470,28 @@ gog_axis_contributors (GogAxis *axis)
* gog_axis_bound_changed :
* @axis : #GogAxis
* @contrib : #GogObject
* @low :
* @high :
**/
void
gog_axis_bound_changed (GogAxis *axis, GogObject *contrib,
double low, double high)
gog_axis_bound_changed (GogAxis *axis, GogObject *contrib)
{
g_return_if_fail (GOG_AXIS (axis) != NULL);
#warning crap
axis->min_val = low;
axis->max_val = high;
gog_object_request_update (GOG_OBJECT (axis));
}
static unsigned
gog_axis_num_markers (GogAxis *axis)
{
#warning bogus quicky
return 2;
if (axis->bound_step <= 0.)
return 1;
return 1 + fabs (axis->bound_max - axis->bound_min) / (double)axis->bound_step;
}
static char const *
static char *
gog_axis_get_marker (GogAxis *axis, unsigned i)
{
#warning bogus quicky
if (i == 0)
return "low";
return "high";
return g_strdup_printf ("%g", axis->bound_min + ((double)i) * axis->bound_step);
}
/****************************************************************************/
......@@ -468,8 +520,9 @@ gog_axis_view_size_request (GogView *view, GogViewRequisition *req)
* things are too big */
gog_renderer_push_style (view->renderer, axis->base.style);
for (i = gog_axis_num_markers (axis) ; i-- > 0 ; ) {
gog_renderer_measure_text (view->renderer,
gog_axis_get_marker (axis, i), &tmp);
char *txt = gog_axis_get_marker (axis, i);
gog_renderer_measure_text (view->renderer, txt, &tmp);
g_free (txt);
if (is_horiz) {
total += tmp.w;
if (max < tmp.h)
......@@ -496,9 +549,12 @@ static void
gog_axis_view_render (GogView *view, GogViewAllocation const *bbox)
{
GogViewAllocation const *area = &view->residual;
GogViewRequisition size;
ArtVpath path[3];
ArtPoint pos;
GogAxis *axis = GOG_AXIS (view->model);
double pre, post;
unsigned n;
double pre, post, step, bound;
double line_width = gog_renderer_line_size (
view->renderer, axis->base.style->line.width) / 2;
......@@ -506,6 +562,7 @@ gog_axis_view_render (GogView *view, GogViewAllocation const *bbox)
g_return_if_fail (axis->pos != GOG_AXIS_IN_MIDDLE);
gog_renderer_push_style (view->renderer, axis->base.style);
switch (axis->type) {
case GOG_AXIS_X:
gog_chart_view_get_indents (view->parent, &pre, &post);
......@@ -526,18 +583,37 @@ gog_axis_view_render (GogView *view, GogViewAllocation const *bbox)
break;
case GOG_AXIS_Y:
path[0].y = area->y;
pos.y = path[0].y = area->y;
path[1].y = area->y + area->h;
switch (axis->pos) {
case GOG_AXIS_AT_LOW:
path[0].x = path[1].x = area->x + area->w - line_width;
pos.x = area->x;
break;
case GOG_AXIS_AT_HIGH:
path[0].x = path[1].x = area->x + line_width;
pos.x = area->x + area->w;
break;
default :
break;
}
n = gog_axis_num_markers (axis);
if (n > 1)
step = area->h / (n - 1);
for (bound = -1 ; n-- > 0 ;) {
if (pos.y >= bound) { /* keep thing sfrom overlapping */
char *txt = gog_axis_get_marker (axis, n);
size.w = area->w - line_width;
size.h = -1;
gog_renderer_draw_text (view->renderer, &pos, GTK_ANCHOR_W, txt, &size);
g_free (txt);
bound = pos.y + size.h;
}
pos.y += step;
}
break;
default :
break;
......@@ -546,7 +622,6 @@ gog_axis_view_render (GogView *view, GogViewAllocation const *bbox)
path[0].code = ART_MOVETO;
path[1].code = ART_LINETO;
path[2].code = ART_END;
gog_renderer_push_style (view->renderer, axis->base.style);
gog_renderer_draw_path (view->renderer, path);
gog_renderer_pop_style (view->renderer);
}
......
......@@ -52,8 +52,7 @@ void gog_axis_add_contributor (GogAxis *axis, GogObject *contrib);
void gog_axis_del_contributor (GogAxis *axis, GogObject *contrib);
GSList const *gog_axis_contributors (GogAxis *axis);
void gog_axis_clear_contributors (GogAxis *axis);
void gog_axis_bound_changed (GogAxis *axis, GogObject *contrib,
double low, double high);
void gog_axis_bound_changed (GogAxis *axis, GogObject *contrib);
G_END_DECLS
......
......@@ -228,7 +228,7 @@ gog_label_view_render (GogView *view, GogViewAllocation const *bbox)
ArtPoint point;
point.x = view->residual.x;
point.y = view->residual.y;
gog_renderer_draw_text (view->renderer, &point, text, NULL);
gog_renderer_draw_text (view->renderer, &point, GTK_ANCHOR_NW, text, NULL);
}
}
gog_renderer_pop_style (view->renderer);
......
......@@ -331,7 +331,7 @@ cb_render_elements (unsigned i, GogStyle const *base_style, char const *name,
pos.x = swatch.x + data->pad_x;
pos.y = swatch.y;
gog_renderer_draw_text (v->renderer, &pos, name, NULL);
gog_renderer_draw_text (v->renderer, &pos, GTK_ANCHOR_NW, name, NULL);
gog_renderer_pop_style (v->renderer);
......
......@@ -61,8 +61,6 @@ typedef struct {
GType series_type;
/* Virtuals */
GOData *(*axis_bounds) (GogPlot *plot, unsigned axis,
double *min, double *max);
unsigned (*cardinality) (GogPlot *plot);
gboolean (*foreach_elem) (GogPlot *plot,
GogEnumFunc handler, gpointer data);
......@@ -70,6 +68,9 @@ typedef struct {
GogAxisSet (*axis_set_pref) (GogPlot const *plot);
gboolean (*axis_set_is_valid) (GogPlot const *plot, GogAxisSet type);
gboolean (*axis_set_assign) (GogPlot *plot, GogAxisSet type);
GOData *(*axis_bounds) (GogPlot *plot, GogAxisType axis,
double *min, double *max,
double *logical_min, double *logical_max);
gboolean (*supports_vary_style_by_element) (GogPlot const *plot);
} GogPlotClass;
......
......@@ -323,10 +323,16 @@ gog_plot_foreach_elem (GogPlot *plot, GogEnumFunc func, gpointer data)
}
GOData *
gog_plot_get_axis_bounds (GogPlot *plot, unsigned axis,
double *min, double *max)
gog_plot_get_axis_bounds (GogPlot *plot, GogAxisType axis,
double *min, double *max,
double *logical_min, double *logical_max)
{
return NULL;
GogPlotClass *klass = GOG_PLOT_GET_CLASS (plot);
g_return_val_if_fail (klass != NULL, FALSE);
return (klass->axis_bounds) (plot, axis, min, max,
logical_min, logical_max);
}
gboolean
......
......@@ -39,8 +39,9 @@ void gog_plot_request_cardinality_update (GogPlot *plot);
unsigned gog_plot_get_cardinality (GogPlot *);
void gog_plot_foreach_elem (GogPlot *,
GogEnumFunc handler, gpointer data);
GOData *gog_plot_get_axis_bounds (GogPlot *plot, unsigned axis,
double *min, double *max);
GOData *gog_plot_get_axis_bounds (GogPlot *plot, GogAxisType axis,
double *min, double *max,
double *logical_min, double *logical_max);
gboolean gog_plot_supports_vary_style_by_element (GogPlot const *plot);
......
......@@ -118,7 +118,7 @@ set_color (GogRendererGnomePrint *prend, GOColor color)
}
static void
draw_path (GogRendererGnomePrint *prend, ArtVpath *path)
draw_path (GogRendererGnomePrint *prend, ArtVpath const *path)
{
gnome_print_newpath (prend->gp_context);
for ( ; path->code != ART_END ; path++)
......@@ -137,7 +137,7 @@ draw_path (GogRendererGnomePrint *prend, ArtVpath *path)
}
static void
gog_renderer_gnome_print_draw_path (GogRenderer *renderer, ArtVpath *path)
gog_renderer_gnome_print_draw_path (GogRenderer *renderer, ArtVpath const *path)
{
GogRendererGnomePrint *prend = GOG_RENDERER_GNOME_PRINT (renderer);
GogStyle const *style = renderer->cur_style;
......@@ -164,7 +164,7 @@ print_image (GogRendererGnomePrint *prend, GdkPixbuf *image, int w, int h)
#define PIXBUF_SIZE 1024
static void
gog_renderer_gnome_print_draw_polygon (GogRenderer *renderer, ArtVpath *path, gboolean narrow)
gog_renderer_gnome_print_draw_polygon (GogRenderer *renderer, ArtVpath const *path, gboolean narrow)
{
GogRendererGnomePrint *prend = GOG_RENDERER_GNOME_PRINT (renderer);
GogStyle const *style = renderer->cur_style;
......@@ -193,7 +193,7 @@ gog_renderer_gnome_print_draw_polygon (GogRenderer *renderer, ArtVpath *path, gb
set_color (prend, color);
gnome_print_fill (prend->gp_context);
} else {
ArtSVP *fill = art_svp_from_vpath (path);
ArtSVP *fill = art_svp_from_vpath ((ArtVpath *)path);
image = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, bbox.x1, bbox.y1);
gdk_pixbuf_fill (image, 0);
go_pattern_render_svp (&style->fill.u.pattern.pat,
......@@ -317,7 +317,8 @@ gog_renderer_gnome_print_draw_polygon (GogRenderer *renderer, ArtVpath *path, gb
}
static void
gog_renderer_gnome_print_draw_text (GogRenderer *rend, ArtPoint *pos,
gog_renderer_gnome_print_draw_text (GogRenderer *rend, ArtPoint const *pos,
GtkAnchorType anchor,
char const *text, GogViewRequisition *size)
{
GogRendererGnomePrint *prend = GOG_RENDERER_GNOME_PRINT (rend);
......@@ -348,9 +349,9 @@ static void
gog_renderer_gnome_print_draw_marker (GogRenderer *renderer, double x, double y)
{
GogRendererGnomePrint *prend = GOG_RENDERER_GNOME_PRINT (renderer);
GOMarker * marker = renderer->cur_style->marker;
const ArtVpath * outline_path_raw, * fill_path_raw;
ArtVpath * outline_path, * fill_path;
GOMarker *marker = renderer->cur_style->marker;
ArtVpath const *outline_path_raw, *fill_path_raw;
ArtVpath *outline_path, *fill_path;
double scaling[6], translation[6], affine[6];
double half_size;
......
......@@ -53,9 +53,9 @@ typedef struct {
void (*push_style) (GogRenderer *renderer, GogStyle const *style);
void (*pop_style) (GogRenderer *renderer);
void (*draw_path) (GogRenderer *renderer, ArtVpath *path);
void (*draw_polygon) (GogRenderer *renderer, ArtVpath *path, gboolean narrow);
void (*draw_text) (GogRenderer *rend, ArtPoint *pos,
void (*draw_path) (GogRenderer *renderer, ArtVpath const *path);
void (*draw_polygon) (GogRenderer *renderer, ArtVpath const *path, gboolean narrow);
void (*draw_text) (GogRenderer *rend, ArtPoint const *pos, GtkAnchorType anchor,
char const *text, GogViewRequisition *size);
void (*draw_marker) (GogRenderer *rend, double x, double y);
void (*measure_text) (GogRenderer *rend,
......
......@@ -55,7 +55,7 @@ static GObjectClass *parent_klass;
static GType gog_renderer_svg_get_type (void);
static void
draw_path (GogRendererSvg *prend, ArtVpath *path, GString *string)
draw_path (GogRendererSvg *prend, ArtVpath const *path, GString *string)
{
for ( ; path->code != ART_END ; path++)
switch (path->code) {
......@@ -71,7 +71,7 @@ draw_path (GogRendererSvg *prend, ArtVpath *path, GString *string)
}
static void
gog_renderer_svg_draw_path (GogRenderer *renderer, ArtVpath *path)
gog_renderer_svg_draw_path (GogRenderer *renderer, ArtVpath const *path)
{
GogRendererSvg *prend = GOG_RENDERER_SVG (renderer);
GogStyle const *style = renderer->cur_style;
......@@ -101,7 +101,7 @@ gog_renderer_svg_draw_path (GogRenderer *renderer, ArtVpath *path)
}
static void
gog_renderer_svg_draw_polygon (GogRenderer *renderer, ArtVpath *path, gboolean narrow)
gog_renderer_svg_draw_polygon (GogRenderer *renderer, ArtVpath const *path, gboolean narrow)
{
GogRendererSvg *prend = GOG_RENDERER_SVG (renderer);
GogStyle const *style = renderer->cur_style;
......@@ -184,7 +184,8 @@ gog_renderer_svg_draw_polygon (GogRenderer *renderer, ArtVpath *path, gboolean n
}
static void
gog_renderer_svg_draw_text (GogRenderer *rend, ArtPoint *pos,
gog_renderer_svg_draw_text (GogRenderer *rend, ArtPoint const *pos,
GtkAnchorType anchor,
char const *text, GogViewRequisition *size)
{
#if 0
......
......@@ -205,7 +205,7 @@ gog_renderer_pop_style (GogRenderer *rend)
* Draws @path using the outline elements of the current style.
**/
void
gog_renderer_draw_path (GogRenderer *rend, ArtVpath *path)
gog_renderer_draw_path (GogRenderer *rend, ArtVpath const *path)
{
GogRendererClass *klass = GOG_RENDERER_GET_CLASS (rend);
......@@ -225,7 +225,7 @@ gog_renderer_draw_path (GogRenderer *rend, ArtVpath *path)
* If @narrow is false it alos outlines it using the outline elements.
**/
void
gog_renderer_draw_polygon (GogRenderer *rend, ArtVpath *path, gboolean narrow)
gog_renderer_draw_polygon (GogRenderer *rend, ArtVpath const *path, gboolean narrow)
{
GogRendererClass *klass = GOG_RENDERER_GET_CLASS (rend);
......@@ -237,14 +237,15 @@ gog_renderer_draw_polygon (GogRenderer *rend, ArtVpath *path, gboolean narrow)
/**
* gog_renderer_draw_text :
* @rend : #GogRenderer
* @pos : #ArtPoint
* @text : the string to draw
* @size : an optionally NULL #GogViewRequisition to store the size of
* @text we just drew.
* @rend : #GogRenderer
* @pos : #ArtPoint
* @anchor : #GtkAnchorType how to draw relative to @pos
* @text : the string to draw
* @size : an optionally NULL #GogViewRequisition to store the size of
* @text we just drew. If w or h is >=0 when called clip the text
**/
void
gog_renderer_draw_text (GogRenderer *rend, ArtPoint *pos,
gog_renderer_draw_text (GogRenderer *rend, ArtPoint const *pos, GtkAnchorType anchor,
char const *text, GogViewRequisition *size)
{
GogRendererClass *klass = GOG_RENDERER_GET_CLASS (rend);
......@@ -253,7 +254,7 @@ gog_renderer_draw_text (GogRenderer *rend, ArtPoint *pos,
g_return_if_fail (rend->cur_style != NULL);
g_return_if_fail (text != NULL);
(klass->draw_text) (rend, pos, text, size);
(klass->draw_text) (rend, pos, anchor, text, size);
}
/**
......
......@@ -22,7 +22,7 @@
#define GOG_RENDERER_H
#include <goffice/graph/goffice-graph.h>
#include <glib-object.h>
#include <gtk/gtkenums.h>
#include <libart_lgpl/libart.h>
#define GOG_RENDERER_TYPE (gog_renderer_get_type ())
......@@ -37,13 +37,14 @@ void gog_renderer_request_update (GogRenderer *r);
void gog_renderer_push_style (GogRenderer *r, GogStyle const *style);
void gog_renderer_pop_style (GogRenderer *r);
void gog_renderer_draw_path (GogRenderer *r, ArtVpath *path);
void gog_renderer_draw_polygon (GogRenderer *r, ArtVpath *path,
void gog_renderer_draw_path (GogRenderer *r, ArtVpath const *path);
void gog_renderer_draw_polygon (GogRenderer *r, ArtVpath const *path,
gboolean narrow);
void gog_renderer_draw_rectangle (GogRenderer *r,
GogViewAllocation const *rect);
void gog_renderer_draw_text (GogRenderer *rend, ArtPoint *pos,
void gog_renderer_draw_text (GogRenderer *rend, ArtPoint const *pos,
GtkAnchorType anchor,
char const *text, GogViewRequisition *size);
void gog_renderer_draw_marker (GogRenderer *rend, double x, double y);
void gog_renderer_measure_text (GogRenderer *rend,
......
......@@ -284,17 +284,8 @@ static void
gog_view_render_real (GogView *view, GogViewAllocation const *bbox)
{
GSList *ptr;
GogView *child;
GogViewClass *klass;
for (ptr = view->children ; ptr != NULL ; ptr = ptr->next) {
child = ptr->data;
klass = GOG_VIEW_GET_CLASS (child);
g_return_if_fail (child->renderer != NULL);
#warning TODO clip based on bbox
(klass->render) (child, bbox);
}
for (ptr = view->children ; ptr != NULL ; ptr = ptr->next)
gog_view_render (ptr->data, bbox);
}
static void
......@@ -466,6 +457,11 @@ void
gog_view_render (GogView *view, GogViewAllocation const *bbox)
{
GogViewClass *klass = GOG_VIEW_GET_CLASS (view);
g_return_if_fail (view->renderer != NULL);
if (view->residual.w < 0 || view->residual.h < 0)
return;
klass->render (view, bbox);
}
......
......@@ -84,36 +84,59 @@ gog_xy_plot_update (GogObject *obj)
if (y_max < tmp_max) y_max = tmp_max;
}
if (model->x.minimum != x_min || model->x.maximum != x_max)
gog_axis_bound_changed (model->base.axis[0], GOG_OBJECT (model),
(model->x.minimum = x_min), (model->x.maximum = x_max));
if (model->y.minimum != y_min || model->y.maximum != y_max)
gog_axis_bound_changed (model->base.axis[1], GOG_OBJECT (model),
(model->y.minimum = y_min), (model->y.maximum = y_max));
if (model->x.minimum != x_min || model->x.maximum != x_max) {
model->x.minimum = x_min;
model->x.maximum = x_max;
gog_axis_bound_changed (model->base.axis[0], GOG_OBJECT (model));
}
if (model->y.minimum != y_min || model->y.maximum != y_max) {
model->y.minimum = y_min;
model->y.maximum = y_max;
gog_axis_bound_changed (model->base.axis[1], GOG_OBJECT (model));
}
gog_object_emit_changed (GOG_OBJECT (obj), FALSE);
if (xy_parent_klass->update)
xy_parent_klass->update (obj);
}
static GogAxisSet
gog_plot_xy_axis_set_pref (GogPlot const *plot)
gog_xy_plot_axis_set_pref (GogPlot const *plot)
{
return GOG_AXIS_SET_XY;
}
static gboolean
gog_plot_xy_axis_set_is_valid (GogPlot const *plot, GogAxisSet type)
gog_xy_plot_axis_set_is_valid (GogPlot const *plot, GogAxisSet type)
{
return type == GOG_AXIS_SET_XY;
}
static gboolean
gog_plot_xy_axis_set_assign (GogPlot *plot, GogAxisSet type)
gog_xy_plot_axis_set_assign (GogPlot *plot, GogAxisSet type)