Tesseract 3.02

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
drawfx.cpp
Go to the documentation of this file.
1 /**********************************************************************
2 * File: drawfx.cpp (Formerly drawfx.c)
3 * Description: Draw things to do with feature extraction.
4 * Author: Ray Smith
5 * Created: Mon Jan 27 11:02:16 GMT 1992
6 *
7 * (C) Copyright 1992, Hewlett-Packard Ltd.
8 ** Licensed under the Apache License, Version 2.0 (the "License");
9 ** you may not use this file except in compliance with the License.
10 ** You may obtain a copy of the License at
11 ** http://www.apache.org/licenses/LICENSE-2.0
12 ** Unless required by applicable law or agreed to in writing, software
13 ** distributed under the License is distributed on an "AS IS" BASIS,
14 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 ** See the License for the specific language governing permissions and
16 ** limitations under the License.
17 *
18 **********************************************************************/
19
20 #include "mfcpch.h"
21 #include "drawfx.h"
22 #include "normalis.h"
23 #include "werd.h"
24
25 // Include automatically generated configuration file if running autoconf.
26 #ifdef HAVE_CONFIG_H
27 #include "config_auto.h"
28 #endif
29
30 #ifndef GRAPHICS_DISABLED
31 #define FXDEMOWIN "FXDemo"
32 #define FXDEMOXPOS 250
33 #define FXDEMOYPOS 0
34 #define FXDEMOXSIZE 600
35 #define FXDEMOYSIZE 256
36 #define BLN_MAX 512 //max coord for bln
37 #define WERDWIDTH (BLN_MAX*20)
38 #define DECENT_WERD_WIDTH (5*kBlnXHeight)
39 //title of window
40 #define DEBUG_WIN_NAME "FXDebug"
41 #define DEBUG_XPOS 0
42 #define DEBUG_YPOS 120
43 #define DEBUG_XSIZE 80
44 #define DEBUG_YSIZE 32
45 #define YMAX 3508
46 #define XMAX 2550
47 #define MAXEDGELENGTH 1024 //max steps inoutline
48
49 #define EXTERN
50
51 EXTERN STRING_VAR (fx_debugfile, DEBUG_WIN_NAME, "Name of debugfile");
52
53 EXTERN ScrollView* fx_win = NULL;
54 EXTERN FILE *fx_debug = NULL;
55
56 /**********************************************************************
57 * create_fx_win
58 *
59 * Create the fx window used to show the fit.
60 **********************************************************************/
61
62 void create_fx_win() { //make features win
63 fx_win = new ScrollView (FXDEMOWIN,
64 FXDEMOXPOS, FXDEMOYPOS, FXDEMOXSIZE, FXDEMOYSIZE,
65 WERDWIDTH*2, BLN_MAX*2, true);
66 }
67
68
69 /**********************************************************************
70 * clear_fx_win
71 *
72 * Clear the fx window and draw on the base/mean lines.
73 **********************************************************************/
74
75 void clear_fx_win() { //make features win
76 fx_win->Clear();
77 fx_win->Pen(64,64,64);
78 fx_win->Line(-WERDWIDTH, kBlnBaselineOffset, WERDWIDTH, kBlnBaselineOffset);
79 fx_win->Line(-WERDWIDTH, kBlnXHeight + kBlnBaselineOffset, WERDWIDTH,
80 kBlnXHeight + kBlnBaselineOffset);
81 }
82
83 #endif // GRAPHICS_DISABLED
84
85 /**********************************************************************
86 * create_fxdebug_win
87 *
88 * Create the fx window used to show the fit.
89 **********************************************************************/
90
91 void create_fxdebug_win() { //make gradients win
92 }