1159b3361Sopenharmony_ci/* 2159b3361Sopenharmony_ci * GTK plotting routines include file 3159b3361Sopenharmony_ci * 4159b3361Sopenharmony_ci * Copyright (c) 1999 Mark Taylor 5159b3361Sopenharmony_ci * 6159b3361Sopenharmony_ci * This library is free software; you can redistribute it and/or 7159b3361Sopenharmony_ci * modify it under the terms of the GNU Library General Public 8159b3361Sopenharmony_ci * License as published by the Free Software Foundation; either 9159b3361Sopenharmony_ci * version 2 of the License, or (at your option) any later version. 10159b3361Sopenharmony_ci * 11159b3361Sopenharmony_ci * This library is distributed in the hope that it will be useful, 12159b3361Sopenharmony_ci * but WITHOUT ANY WARRANTY; without even the implied warranty of 13159b3361Sopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14159b3361Sopenharmony_ci * Library General Public License for more details. 15159b3361Sopenharmony_ci * 16159b3361Sopenharmony_ci * You should have received a copy of the GNU Library General Public 17159b3361Sopenharmony_ci * License along with this library; if not, write to the 18159b3361Sopenharmony_ci * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19159b3361Sopenharmony_ci * Boston, MA 02111-1307, USA. 20159b3361Sopenharmony_ci */ 21159b3361Sopenharmony_ci 22159b3361Sopenharmony_ci#ifndef LAME_GPKPLOTTING_H 23159b3361Sopenharmony_ci#define LAME_GPKPLOTTING_H 24159b3361Sopenharmony_ci 25159b3361Sopenharmony_ci#include <gtk/gtk.h> 26159b3361Sopenharmony_ci 27159b3361Sopenharmony_ci/* allocate a graphing widget */ 28159b3361Sopenharmony_ciGtkWidget *gpk_plot_new(int width, int height); 29159b3361Sopenharmony_ci 30159b3361Sopenharmony_ci/* graph a function in the graphing widged */ 31159b3361Sopenharmony_civoid gpk_graph_draw(GtkWidget * widget, 32159b3361Sopenharmony_ci int n, gdouble * xcord, gdouble * ycord, 33159b3361Sopenharmony_ci gdouble xmn, gdouble ymn, gdouble xmx, gdouble ymx, 34159b3361Sopenharmony_ci int clear, char *title, GdkColor * color); 35159b3361Sopenharmony_ci 36159b3361Sopenharmony_ci/* draw a rectangle in the graphing widget */ 37159b3361Sopenharmony_civoid gpk_rectangle_draw(GtkWidget * widget, /* plot on this widged */ 38159b3361Sopenharmony_ci gdouble xcord[2], gdouble ycord[2], /* corners */ 39159b3361Sopenharmony_ci gdouble xmn, gdouble ymn, /* coordinates of corners */ 40159b3361Sopenharmony_ci gdouble xmx, gdouble ymx, GdkColor * color); /* color to use */ 41159b3361Sopenharmony_ci 42159b3361Sopenharmony_ci/* make a bar graph in the graphing widged */ 43159b3361Sopenharmony_civoid gpk_bargraph_draw(GtkWidget * widget, 44159b3361Sopenharmony_ci int n, gdouble * xcord, gdouble * ycord, 45159b3361Sopenharmony_ci gdouble xmn, gdouble ymn, gdouble xmx, gdouble ymx, 46159b3361Sopenharmony_ci int clear, char *title, int bwidth, GdkColor * color); 47159b3361Sopenharmony_ci 48159b3361Sopenharmony_ci/* set forground color */ 49159b3361Sopenharmony_civoid setcolor(GtkWidget * widget, GdkColor * color, int red, int green, int blue); 50159b3361Sopenharmony_ci 51159b3361Sopenharmony_ci#endif 52