textord/drawedg.cpp File Reference

#include "mfcpch.h"
#include "drawedg.h"
#include "evnts.h"

Go to the source code of this file.

Defines

Functions


Define Documentation

#define CTRLD   '\004'

Definition at line 28 of file drawedg.cpp.

#define EXTERN

Definition at line 30 of file drawedg.cpp.

#define IMAGE_WIN_NAME   "Edges"

title of window

Note:
File: drawedg.cpp (Formerly drawedge.c)
Collection of functions to draw things to do with edge detection.
Author:
Ray Smith
Date:
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.

Definition at line 25 of file drawedg.cpp.

Referenced by create_edges_window().

#define IMAGE_XPOS   250

Definition at line 26 of file drawedg.cpp.

Referenced by create_edges_window().

#define IMAGE_YPOS   0

Definition at line 27 of file drawedg.cpp.

Referenced by create_edges_window().


Function Documentation

WINDOW create_edges_window ( ICOORD  page_tr  ) 

Create the edges window.

Note:
File: drawedg.h (Formerly drawedge.h)
Collection of functions to draw things to do with edge detection.
Author:
Ray Smith
Date:
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.

Definition at line 35 of file drawedg.cpp.

References create_window, FALSE, image_win, IMAGE_WIN_NAME, IMAGE_XPOS, IMAGE_YPOS, overlap_picture_ops, SCROLLINGWIN, set_selection_handler, TRUE, win_selection_handler, and ICOORD::y().

00037                             {
00038   WINDOW image_win;              //image window
00039 
00040                                  //create the window
00041   image_win = create_window (IMAGE_WIN_NAME, SCROLLINGWIN,
00042    IMAGE_XPOS, IMAGE_YPOS, 0, 0, (float) 0.0, page_tr.x (),
00043    (float) 0.0, page_tr.y (), TRUE, FALSE, FALSE, FALSE);
00044   #ifdef __MSW32__
00045   set_selection_handler(image_win, win_selection_handler); 
00046   #endif
00047   overlap_picture_ops(TRUE); 
00048   return image_win;              //window
00049 }

void draw_raw_edge ( WINDOW  fd,
CRACKEDGE start,
COLOUR  colour 
)

Draw the raw steps to the given window in the given colour.

Definition at line 55 of file drawedg.cpp.

References draw2d, line_color_index, move2d, CRACKEDGE::next, CRACKEDGE::pos, CRACKEDGE::prev, CRACKEDGE::stepx, CRACKEDGE::stepy, and ICOORD::y().

Referenced by complete_edge().

00059                     {
00060   CRACKEDGE *edgept;             //current point
00061 
00062   line_color_index(fd, colour);  //in white
00063   edgept = start;
00064   move2d (fd, edgept->pos.x (), edgept->pos.y ());
00065   do {
00066     do
00067     edgept = edgept->next;
00068                                  //merge straight lines
00069     while (edgept != start && edgept->prev->stepx == edgept->stepx
00070       && edgept->prev->stepy == edgept->stepy);
00071 
00072                                  //draw lines
00073     draw2d (fd, edgept->pos.x (), edgept->pos.y ());
00074   }
00075   while (edgept != start);
00076 }


Generated on Wed Feb 28 19:49:24 2007 for Tesseract by  doxygen 1.5.1