gpkplotting.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. #ifndef LAME_GPKPLOTTING_H
  22. #define LAME_GPKPLOTTING_H
  23. #include <gtk/gtk.h>
  24. /* allocate a graphing widget */
  25. GtkWidget *gpk_plot_new(int width, int height);
  26. /* graph a function in the graphing widged */
  27. void gpk_graph_draw(GtkWidget * widget,
  28. int n, gdouble * xcord, gdouble * ycord,
  29. gdouble xmn, gdouble ymn, gdouble xmx, gdouble ymx,
  30. int clear, char *title, GdkColor * color);
  31. /* draw a rectangle in the graphing widget */
  32. void gpk_rectangle_draw(GtkWidget * widget, /* plot on this widged */
  33. gdouble xcord[2], gdouble ycord[2], /* corners */
  34. gdouble xmn, gdouble ymn, /* coordinates of corners */
  35. gdouble xmx, gdouble ymx, GdkColor * color); /* color to use */
  36. /* make a bar graph in the graphing widged */
  37. void gpk_bargraph_draw(GtkWidget * widget,
  38. int n, gdouble * xcord, gdouble * ycord,
  39. gdouble xmn, gdouble ymn, gdouble xmx, gdouble ymx,
  40. int clear, char *title, int bwidth, GdkColor * color);
  41. /* set forground color */
  42. void setcolor(GtkWidget * widget, GdkColor * color, int red, int green, int blue);
  43. #endif