mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-03 08:59:07 +08:00
Remove unused functions create_edges_window, draw_raw_edge
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
23e605911f
commit
970622fbd1
@ -22,7 +22,7 @@ noinst_HEADERS = \
|
||||
alignedblob.h baselinedetect.h bbgrid.h blkocc.h blobgrid.h \
|
||||
ccnontextdetect.h cjkpitch.h colfind.h colpartition.h colpartitionset.h \
|
||||
colpartitiongrid.h \
|
||||
devanagari_processing.h drawedg.h drawtord.h edgblob.h edgloop.h \
|
||||
devanagari_processing.h drawtord.h edgblob.h edgloop.h \
|
||||
equationdetectbase.h \
|
||||
fpchop.h gap_map.h imagefind.h linefind.h makerow.h oldbasel.h \
|
||||
pithsync.h pitsync1.h scanedg.h sortflts.h strokewidth.h \
|
||||
@ -37,7 +37,7 @@ libtesseract_textord_la_SOURCES = \
|
||||
alignedblob.cpp baselinedetect.cpp bbgrid.cpp blkocc.cpp blobgrid.cpp \
|
||||
ccnontextdetect.cpp cjkpitch.cpp colfind.cpp colpartition.cpp colpartitionset.cpp \
|
||||
colpartitiongrid.cpp devanagari_processing.cpp \
|
||||
drawedg.cpp drawtord.cpp edgblob.cpp edgloop.cpp \
|
||||
drawtord.cpp edgblob.cpp edgloop.cpp \
|
||||
equationdetectbase.cpp \
|
||||
fpchop.cpp gap_map.cpp imagefind.cpp linefind.cpp makerow.cpp oldbasel.cpp \
|
||||
pithsync.cpp pitsync1.cpp scanedg.cpp sortflts.cpp strokewidth.cpp \
|
||||
|
@ -1,81 +0,0 @@
|
||||
/**********************************************************************
|
||||
* File: drawedg.cpp (Formerly drawedge.c)
|
||||
* Description: Collection of functions to draw things to do with edge
|
||||
* detection.
|
||||
* Author: Ray Smith
|
||||
* Created: Thu Jun 06 13:29:20 BST 1991
|
||||
*
|
||||
* (C) Copyright 1991, Hewlett-Packard Ltd.
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#include "drawedg.h"
|
||||
|
||||
// Include automatically generated configuration file if running autoconf.
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config_auto.h"
|
||||
#endif
|
||||
|
||||
#ifndef GRAPHICS_DISABLED
|
||||
|
||||
/** title of window */
|
||||
#define IMAGE_WIN_NAME "Edges"
|
||||
#define IMAGE_XPOS 250
|
||||
/** default position */
|
||||
#define IMAGE_YPOS 0
|
||||
|
||||
/**
|
||||
* @name create_edges_window
|
||||
*
|
||||
* Create the edges window.
|
||||
* @param page_tr size of image
|
||||
*/
|
||||
|
||||
ScrollView* create_edges_window(ICOORD page_tr) {
|
||||
ScrollView* image_win; //image window
|
||||
|
||||
//create the window
|
||||
image_win = new ScrollView (IMAGE_WIN_NAME, IMAGE_XPOS, IMAGE_YPOS, 0, 0, page_tr.x (), page_tr.y ());
|
||||
return image_win; //window
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @name draw_raw_edge
|
||||
*
|
||||
* Draw the raw steps to the given window in the given colour.
|
||||
* @param fd window to draw in
|
||||
* @param start start of loop
|
||||
* @param colour colour to draw in
|
||||
*/
|
||||
|
||||
void draw_raw_edge(ScrollView* fd,
|
||||
CRACKEDGE *start,
|
||||
ScrollView::Color colour) {
|
||||
CRACKEDGE *edgept; //current point
|
||||
|
||||
fd->Pen(colour);
|
||||
edgept = start;
|
||||
fd->SetCursor(edgept->pos.x (), edgept->pos.y ());
|
||||
do {
|
||||
do
|
||||
edgept = edgept->next;
|
||||
//merge straight lines
|
||||
while (edgept != start && edgept->prev->stepx == edgept->stepx && edgept->prev->stepy == edgept->stepy);
|
||||
|
||||
//draw lines
|
||||
fd->DrawTo(edgept->pos.x (), edgept->pos.y ());
|
||||
}
|
||||
while (edgept != start);
|
||||
}
|
||||
|
||||
#endif // GRAPHICS_DISABLED
|
@ -1,37 +0,0 @@
|
||||
/**********************************************************************
|
||||
* File: drawedg.h (Formerly drawedge.h)
|
||||
* Description: Collection of functions to draw things to do with edge
|
||||
*detection.
|
||||
* Author: Ray Smith
|
||||
* Created: Thu Jun 06 13:29:20 BST 1991
|
||||
*
|
||||
* (C) Copyright 1991, Hewlett-Packard Ltd.
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef DRAWEDG_H
|
||||
#define DRAWEDG_H
|
||||
#ifndef GRAPHICS_DISABLED
|
||||
|
||||
#include "scrollview.h"
|
||||
#include "crakedge.h"
|
||||
|
||||
ScrollView* create_edges_window( //make window
|
||||
ICOORD page_tr //size of image
|
||||
);
|
||||
void draw_raw_edge( //draw the cracks
|
||||
ScrollView* fd, //window to draw in
|
||||
CRACKEDGE *start, //start of loop
|
||||
ScrollView::Color colour //colour to draw in
|
||||
);
|
||||
#endif
|
||||
#endif
|
@ -17,7 +17,6 @@
|
||||
**********************************************************************/
|
||||
|
||||
#include "scanedg.h"
|
||||
#include "drawedg.h"
|
||||
#include "edgloop.h"
|
||||
#include "edgblob.h"
|
||||
|
||||
|
@ -1,8 +1,7 @@
|
||||
/**********************************************************************
|
||||
* File: edgloop.cpp (Formerly edgeloop.c)
|
||||
* Description: Functions to clean up an outline before approximation.
|
||||
* Author: Ray Smith
|
||||
* Created: Tue Mar 26 16:56:25 GMT 1991
|
||||
* Author: Ray Smith
|
||||
*
|
||||
* (C) Copyright 1991, Hewlett-Packard Ltd.
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -17,9 +16,8 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#include "scanedg.h"
|
||||
#include "drawedg.h"
|
||||
#include "edgloop.h"
|
||||
#include "scanedg.h"
|
||||
#include "edgloop.h"
|
||||
|
||||
// Include automatically generated configuration file if running autoconf.
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
Loading…
Reference in New Issue
Block a user