/ocr/ocrservice/jni/hydrogen/include/leptonica/gplot.h

http://eyes-free.googlecode.com/ · C++ Header · 77 lines · 48 code · 10 blank · 19 comment · 0 complexity · 07ce553fdac28b6b8aef4d90e3a8d317 MD5 · raw file

  1. /*====================================================================*
  2. - Copyright (C) 2001 Leptonica. All rights reserved.
  3. - This software is distributed in the hope that it will be
  4. - useful, but with NO WARRANTY OF ANY KIND.
  5. - No author or distributor accepts responsibility to anyone for the
  6. - consequences of using this software, or for whether it serves any
  7. - particular purpose or works at all, unless he or she says so in
  8. - writing. Everyone is granted permission to copy, modify and
  9. - redistribute this source code, for commercial or non-commercial
  10. - purposes, with the following restrictions: (1) the origin of this
  11. - source code must not be misrepresented; (2) modified versions must
  12. - be plainly marked as such; and (3) this notice may not be removed
  13. - or altered from any source or modified source distribution.
  14. *====================================================================*/
  15. #ifndef LEPTONICA_GPLOT_H
  16. #define LEPTONICA_GPLOT_H
  17. /*
  18. * gplot.h
  19. *
  20. * Data structures and parameters for generating gnuplot files
  21. */
  22. #define GPLOT_VERSION_NUMBER 1
  23. #define NUM_GPLOT_STYLES 5
  24. enum GPLOT_STYLE {
  25. GPLOT_LINES = 0,
  26. GPLOT_POINTS = 1,
  27. GPLOT_IMPULSES = 2,
  28. GPLOT_LINESPOINTS = 3,
  29. GPLOT_DOTS = 4
  30. };
  31. #define NUM_GPLOT_OUTPUTS 6
  32. enum GPLOT_OUTPUT {
  33. GPLOT_NONE = 0,
  34. GPLOT_PNG = 1,
  35. GPLOT_PS = 2,
  36. GPLOT_EPS = 3,
  37. GPLOT_X11 = 4,
  38. GPLOT_LATEX = 5
  39. };
  40. enum GPLOT_SCALING {
  41. GPLOT_LINEAR_SCALE = 0, /* default */
  42. GPLOT_LOG_SCALE_X = 1,
  43. GPLOT_LOG_SCALE_Y = 2,
  44. GPLOT_LOG_SCALE_X_Y = 3
  45. };
  46. extern const char *gplotstylenames[]; /* used in gnuplot cmd file */
  47. extern const char *gplotfilestyles[]; /* used in simple file input */
  48. extern const char *gplotfileoutputs[]; /* used in simple file input */
  49. struct GPlot
  50. {
  51. char *rootname; /* for cmd, data, output */
  52. char *cmdname; /* command file name */
  53. struct Sarray *cmddata; /* command file contents */
  54. struct Sarray *datanames; /* data file names */
  55. struct Sarray *plotdata; /* plot data (1 string/file) */
  56. struct Sarray *plottitles; /* title for each individual plot */
  57. struct Numa *plotstyles; /* plot style for individual plots */
  58. l_int32 nplots; /* current number of plots */
  59. char *outname; /* output file name */
  60. l_int32 outformat; /* GPLOT_OUTPUT values */
  61. l_int32 scaling; /* GPLOT_SCALING values */
  62. char *title; /* optional */
  63. char *xlabel; /* optional x axis label */
  64. char *ylabel; /* optional y axis label */
  65. };
  66. typedef struct GPlot GPLOT;
  67. #endif /* LEPTONICA_GPLOT_H */