| 1 |
/* |
| 2 |
* GTK plotting routines include file |
| 3 |
* |
| 4 |
* Copyright (c) 1999 Mark Taylor |
| 5 |
* |
| 6 |
* This library is free software; you can redistribute it and/or |
| 7 |
* modify it under the terms of the GNU Library General Public |
| 8 |
* License as published by the Free Software Foundation; either |
| 9 |
* version 2 of the License, or (at your option) any later version. |
| 10 |
* |
| 11 |
* This library is distributed in the hope that it will be useful, |
| 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 |
* Library General Public License for more details. |
| 15 |
* |
| 16 |
* You should have received a copy of the GNU Library General Public |
| 17 |
* License along with this library; if not, write to the |
| 18 |
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 19 |
* Boston, MA 02111-1307, USA. |
| 20 |
*/ |
| 21 |
|
| 22 |
#ifndef LAME_GPKPLOTTING_H |
| 23 |
#define LAME_GPKPLOTTING_H |
| 24 |
|
| 25 |
#include <gtk/gtk.h> |
| 26 |
|
| 27 |
/* allocate a graphing widget */ |
| 28 |
GtkWidget *gpk_plot_new(int width, int height); |
| 29 |
|
| 30 |
/* graph a function in the graphing widged */ |
| 31 |
void gpk_graph_draw(GtkWidget * widget, |
| 32 |
int n, gdouble * xcord, gdouble * ycord, |
| 33 |
gdouble xmn, gdouble ymn, gdouble xmx, gdouble ymx, |
| 34 |
int clear, char *title, GdkColor * color); |
| 35 |
|
| 36 |
/* draw a rectangle in the graphing widget */ |
| 37 |
void gpk_rectangle_draw(GtkWidget * widget, /* plot on this widged */ |
| 38 |
gdouble xcord[2], gdouble ycord[2], /* corners */ |
| 39 |
gdouble xmn, gdouble ymn, /* coordinates of corners */ |
| 40 |
gdouble xmx, gdouble ymx, GdkColor * color); /* color to use */ |
| 41 |
|
| 42 |
/* make a bar graph in the graphing widged */ |
| 43 |
void gpk_bargraph_draw(GtkWidget * widget, |
| 44 |
int n, gdouble * xcord, gdouble * ycord, |
| 45 |
gdouble xmn, gdouble ymn, gdouble xmx, gdouble ymx, |
| 46 |
int clear, char *title, int bwidth, GdkColor * color); |
| 47 |
|
| 48 |
/* set forground color */ |
| 49 |
void setcolor(GtkWidget * widget, GdkColor * color, int red, int green, int blue); |
| 50 |
|
| 51 |
#endif |