tesseract  4.00.00dev
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 #ifdef HAVE_CONFIG_H
21 #include "config_auto.h"
22 #endif
23 
24 #include "drawfx.h"
25 #include "normalis.h"
26 #include "werd.h"
27 
28 #ifndef GRAPHICS_DISABLED
29 #define FXDEMOWIN "FXDemo"
30 #define FXDEMOXPOS 250
31 #define FXDEMOYPOS 0
32 #define FXDEMOXSIZE 600
33 #define FXDEMOYSIZE 256
34 #define BLN_MAX 512 //max coord for bln
35 #define WERDWIDTH (BLN_MAX*20)
36 #define DECENT_WERD_WIDTH (5*kBlnXHeight)
37  //title of window
38 #define DEBUG_WIN_NAME "FXDebug"
39 #define DEBUG_XPOS 0
40 #define DEBUG_YPOS 120
41 #define DEBUG_XSIZE 80
42 #define DEBUG_YSIZE 32
43 #define YMAX 3508
44 #define XMAX 2550
45 #define MAXEDGELENGTH 1024 //max steps inoutline
46 
47 #define EXTERN
48 
49 EXTERN STRING_VAR (fx_debugfile, DEBUG_WIN_NAME, "Name of debugfile");
50 
52 EXTERN FILE *fx_debug = NULL;
53 
54 /**********************************************************************
55  * create_fx_win
56  *
57  * Create the fx window used to show the fit.
58  **********************************************************************/
59 
60 void create_fx_win() { //make features win
63  WERDWIDTH*2, BLN_MAX*2, true);
64 }
65 
66 
67 /**********************************************************************
68  * clear_fx_win
69  *
70  * Clear the fx window and draw on the base/mean lines.
71  **********************************************************************/
72 
73 void clear_fx_win() { //make features win
74  fx_win->Clear();
75  fx_win->Pen(64,64,64);
79 }
80 
81 #endif // GRAPHICS_DISABLED
82 
83 /**********************************************************************
84  * create_fxdebug_win
85  *
86  * Create the fx window used to show the fit.
87  **********************************************************************/
88 
89 void create_fxdebug_win() { //make gradients win
90 }
EXTERN char * fx_debugfile
Definition: drawfx.cpp:49
void Line(int x1, int y1, int x2, int y2)
Definition: scrollview.cpp:538
#define FXDEMOYSIZE
Definition: drawfx.cpp:33
#define WERDWIDTH
Definition: drawfx.cpp:35
#define BLN_MAX
Definition: drawfx.cpp:34
const int kBlnXHeight
Definition: normalis.h:28
const int kBlnBaselineOffset
Definition: normalis.h:29
#define FXDEMOYPOS
Definition: drawfx.cpp:31
void create_fxdebug_win()
Definition: drawfx.cpp:89
void Clear()
Definition: scrollview.cpp:595
#define FXDEMOWIN
Definition: drawfx.cpp:29
EXTERN FILE * fx_debug
Definition: drawfx.cpp:52
#define DEBUG_WIN_NAME
Definition: drawfx.cpp:38
EXTERN ScrollView * fx_win
Definition: drawfx.cpp:51
void clear_fx_win()
Definition: drawfx.cpp:73
#define FXDEMOXSIZE
Definition: drawfx.cpp:32
#define FXDEMOXPOS
Definition: drawfx.cpp:30
#define STRING_VAR(name, val, comment)
Definition: params.h:282
#define EXTERN
Definition: drawfx.cpp:47
void create_fx_win()
Definition: drawfx.cpp:60
void Pen(Color color)
Definition: scrollview.cpp:726