PageRenderTime 17ms CodeModel.GetById 1ms app.highlight 10ms RepoModel.GetById 2ms app.codeStats 0ms

/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
16#ifndef  LEPTONICA_GPLOT_H
17#define  LEPTONICA_GPLOT_H
18
19/*
20 *   gplot.h
21 *
22 *       Data structures and parameters for generating gnuplot files
23 */
24
25#define  GPLOT_VERSION_NUMBER    1
26
27#define  NUM_GPLOT_STYLES      5
28enum GPLOT_STYLE {
29    GPLOT_LINES       = 0,
30    GPLOT_POINTS      = 1,
31    GPLOT_IMPULSES    = 2,
32    GPLOT_LINESPOINTS = 3,
33    GPLOT_DOTS        = 4
34};
35
36#define  NUM_GPLOT_OUTPUTS     6
37enum GPLOT_OUTPUT {
38    GPLOT_NONE  = 0,
39    GPLOT_PNG   = 1,
40    GPLOT_PS    = 2,
41    GPLOT_EPS   = 3,
42    GPLOT_X11   = 4,
43    GPLOT_LATEX = 5
44};
45
46enum GPLOT_SCALING {
47    GPLOT_LINEAR_SCALE  = 0,   /* default */
48    GPLOT_LOG_SCALE_X   = 1,
49    GPLOT_LOG_SCALE_Y   = 2,
50    GPLOT_LOG_SCALE_X_Y = 3
51};
52
53extern const char  *gplotstylenames[];  /* used in gnuplot cmd file */
54extern const char  *gplotfilestyles[];  /* used in simple file input */
55extern const char  *gplotfileoutputs[]; /* used in simple file input */
56
57struct GPlot
58{
59    char          *rootname;   /* for cmd, data, output            */
60    char          *cmdname;    /* command file name                */
61    struct Sarray *cmddata;    /* command file contents            */
62    struct Sarray *datanames;  /* data file names                  */
63    struct Sarray *plotdata;   /* plot data (1 string/file)        */
64    struct Sarray *plottitles; /* title for each individual plot   */
65    struct Numa   *plotstyles; /* plot style for individual plots  */
66    l_int32        nplots;     /* current number of plots          */
67    char          *outname;    /* output file name                 */
68    l_int32        outformat;  /* GPLOT_OUTPUT values              */
69    l_int32        scaling;    /* GPLOT_SCALING values             */
70    char          *title;      /* optional                         */
71    char          *xlabel;     /* optional x axis label            */
72    char          *ylabel;     /* optional y axis label            */
73};
74typedef struct GPlot  GPLOT;
75
76
77#endif /* LEPTONICA_GPLOT_H */