tesseract  5.0.0-alpha-619-ge9db
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  *
6  * (C) Copyright 1992, Hewlett-Packard Ltd.
7  ** Licensed under the Apache License, Version 2.0 (the "License");
8  ** you may not use this file except in compliance with the License.
9  ** You may obtain a copy of the License at
10  ** http://www.apache.org/licenses/LICENSE-2.0
11  ** Unless required by applicable law or agreed to in writing, software
12  ** distributed under the License is distributed on an "AS IS" BASIS,
13  ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  ** See the License for the specific language governing permissions and
15  ** limitations under the License.
16  *
17  **********************************************************************/
18 
19 #ifdef HAVE_CONFIG_H
20 #include "config_auto.h"
21 #endif
22 
23 #include "drawfx.h"
24 #include "normalis.h"
25 #include "werd.h"
26 
27 #ifndef GRAPHICS_DISABLED
28 #define FXDEMOWIN "FXDemo"
29 #define FXDEMOXPOS 250
30 #define FXDEMOYPOS 0
31 #define FXDEMOXSIZE 600
32 #define FXDEMOYSIZE 256
33 #define BLN_MAX 512 //max coord for bln
34 #define WERDWIDTH (BLN_MAX*20)
35  //title of window
36 #define DEBUG_WIN_NAME "FXDebug"
37 
38 STRING_VAR(fx_debugfile, DEBUG_WIN_NAME, "Name of debugfile");
39 
40 ScrollView* fx_win = nullptr;
41 FILE* fx_debug = nullptr;
42 
43 /**********************************************************************
44  * create_fx_win
45  *
46  * Create the fx window used to show the fit.
47  **********************************************************************/
48 
49 void create_fx_win() { //make features win
52  WERDWIDTH*2, BLN_MAX*2, true);
53 }
54 
55 
56 /**********************************************************************
57  * clear_fx_win
58  *
59  * Clear the fx window and draw on the base/mean lines.
60  **********************************************************************/
61 
62 void clear_fx_win() { //make features win
63  fx_win->Clear();
64  fx_win->Pen(64,64,64);
68 }
69 
70 #endif // GRAPHICS_DISABLED
71 
72 /**********************************************************************
73  * create_fxdebug_win
74  *
75  * Create the fx window used to show the fit.
76  **********************************************************************/
77 
78 void create_fxdebug_win() { //make gradients win
79 }
ScrollView
Definition: scrollview.h:97
FXDEMOYPOS
#define FXDEMOYPOS
Definition: drawfx.cpp:30
normalis.h
clear_fx_win
void clear_fx_win()
Definition: drawfx.cpp:60
kBlnXHeight
const int kBlnXHeight
Definition: normalis.h:23
WERDWIDTH
#define WERDWIDTH
Definition: drawfx.cpp:34
fx_win
ScrollView * fx_win
Definition: drawfx.cpp:40
create_fx_win
void create_fx_win()
Definition: drawfx.cpp:48
DEBUG_WIN_NAME
#define DEBUG_WIN_NAME
Definition: drawfx.cpp:36
ScrollView::Clear
void Clear()
Definition: scrollview.cpp:588
drawfx.h
STRING_VAR
#define STRING_VAR(name, val, comment)
Definition: params.h:306
ScrollView::Pen
void Pen(Color color)
Definition: scrollview.cpp:717
fx_debug
FILE * fx_debug
Definition: drawfx.cpp:41
werd.h
fx_debugfile
char * fx_debugfile
Definition: drawfx.cpp:38
FXDEMOXSIZE
#define FXDEMOXSIZE
Definition: drawfx.cpp:31
FXDEMOXPOS
#define FXDEMOXPOS
Definition: drawfx.cpp:29
FXDEMOYSIZE
#define FXDEMOYSIZE
Definition: drawfx.cpp:32
create_fxdebug_win
void create_fxdebug_win()
Definition: drawfx.cpp:75
BLN_MAX
#define BLN_MAX
Definition: drawfx.cpp:33
FXDEMOWIN
#define FXDEMOWIN
Definition: drawfx.cpp:28
ScrollView::Line
void Line(int x1, int y1, int x2, int y2)
Definition: scrollview.cpp:531
kBlnBaselineOffset
const int kBlnBaselineOffset
Definition: normalis.h:24