Blame src/graphing/dzl-graph-renderer.c

rpm-build f53ec4
/* dzl-graph-renderer.c
rpm-build f53ec4
 *
rpm-build f53ec4
 * Copyright (C) 2015 Christian Hergert <christian@hergert.me>
rpm-build f53ec4
 *
rpm-build f53ec4
 * This file is free software; you can redistribute it and/or modify it
rpm-build f53ec4
 * under the terms of the GNU Lesser General Public License as
rpm-build f53ec4
 * published by the Free Software Foundation; either version 3 of the
rpm-build f53ec4
 * License, or (at your option) any later version.
rpm-build f53ec4
 *
rpm-build f53ec4
 * This file is distributed in the hope that it will be useful, but
rpm-build f53ec4
 * WITHOUT ANY WARRANTY; without even the implied warranty of
rpm-build f53ec4
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
rpm-build f53ec4
 * Lesser General Public License for more details.
rpm-build f53ec4
 *
rpm-build f53ec4
 * You should have received a copy of the GNU General Public License
rpm-build f53ec4
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
rpm-build f53ec4
 */
rpm-build f53ec4
rpm-build f53ec4
#include "config.h"
rpm-build f53ec4
rpm-build f53ec4
#include <cairo.h>
rpm-build f53ec4
rpm-build f53ec4
#include "dzl-graph-renderer.h"
rpm-build f53ec4
rpm-build f53ec4
G_DEFINE_INTERFACE (DzlGraphRenderer, dzl_graph_view_renderer, G_TYPE_OBJECT)
rpm-build f53ec4
rpm-build f53ec4
static void
rpm-build f53ec4
dummy_render (DzlGraphRenderer                  *renderer,
rpm-build f53ec4
              DzlGraphModel                     *table,
rpm-build f53ec4
              gint64                       x_begin,
rpm-build f53ec4
              gint64                       x_end,
rpm-build f53ec4
              gdouble                      y_begin,
rpm-build f53ec4
              gdouble                      y_end,
rpm-build f53ec4
              cairo_t                     *cr,
rpm-build f53ec4
              const cairo_rectangle_int_t *area)
rpm-build f53ec4
{
rpm-build f53ec4
}
rpm-build f53ec4
rpm-build f53ec4
static void
rpm-build f53ec4
dzl_graph_view_renderer_default_init (DzlGraphRendererInterface *iface)
rpm-build f53ec4
{
rpm-build f53ec4
  iface->render = dummy_render;
rpm-build f53ec4
}
rpm-build f53ec4
rpm-build f53ec4
void
rpm-build f53ec4
dzl_graph_view_renderer_render (DzlGraphRenderer                  *self,
rpm-build f53ec4
                                DzlGraphModel                     *table,
rpm-build f53ec4
                                gint64                       x_begin,
rpm-build f53ec4
                                gint64                       x_end,
rpm-build f53ec4
                                gdouble                      y_begin,
rpm-build f53ec4
                                gdouble                      y_end,
rpm-build f53ec4
                                cairo_t                     *cr,
rpm-build f53ec4
                                const cairo_rectangle_int_t *area)
rpm-build f53ec4
{
rpm-build f53ec4
  g_return_if_fail (DZL_IS_GRAPH_RENDERER (self));
rpm-build f53ec4
  g_return_if_fail (cr != NULL);
rpm-build f53ec4
  g_return_if_fail (area != NULL);
rpm-build f53ec4
rpm-build f53ec4
  DZL_GRAPH_RENDERER_GET_IFACE (self)->render (self, table, x_begin, x_end, y_begin, y_end, cr, area);
rpm-build f53ec4
}