#include "callcpp.h"
#include "oldlist.h"
#include "tessclas.h"
#include "split.h"
Go to the source code of this file.
#define edge_window_wait | ( | ) | if (display_splits) window_wait (edge_window) |
Wait for someone to click in the edges window.
Definition at line 50 of file plotedges.h.
Referenced by pick_good_seam().
#define update_edge_window | ( | ) |
Value:
if (display_splits) { \ c_make_current (edge_window); \ } \
Definition at line 41 of file plotedges.h.
Referenced by pick_good_seam().
void display_edgepts | ( | LIST | outlines | ) |
Macro to display edge points in a window.
Definition at line 40 of file plotedges.cpp.
References c_clear_window(), c_create_window(), edge_window, first, iterate, NULL, render_edgepts(), and White.
Referenced by draw_blob_edges().
00040 { 00041 void *window; 00042 /* Set up window */ 00043 if (edge_window == NULL) { 00044 edge_window = c_create_window ("Edges", 750, 150, 00045 400, 128, -400.0, 400.0, 0.0, 256.0); 00046 } 00047 else { 00048 c_clear_window(edge_window); 00049 } 00050 /* Render the outlines */ 00051 window = edge_window; 00052 /* Reclaim old memory */ 00053 iterate(outlines) { 00054 render_edgepts (window, (EDGEPT *) first (outlines), White); 00055 } 00056 }
void draw_blob_edges | ( | TBLOB * | blob | ) |
Display the edges of this blob in the edges window.
Definition at line 63 of file plotedges.cpp.
References destroy(), display_edgepts(), display_splits, olinestruct::loop, olinestruct::next, NIL, NULL, blobstruct::outlines, and push_on.
Referenced by pick_good_seam().
00063 { 00064 TESSLINE *ol; 00065 LIST edge_list = NIL; 00066 00067 if (display_splits) { 00068 for (ol = blob->outlines; ol != NULL; ol = ol->next) 00069 push_on (edge_list, ol->loop); 00070 display_edgepts(edge_list); 00071 destroy(edge_list); 00072 } 00073 }
void mark_outline | ( | EDGEPT * | edgept | ) |
Make a mark on the edges window at a particular location.
Definition at line 80 of file plotedges.cpp.
References c_draw(), c_line_color_index(), c_make_current(), c_move(), edge_window, edgeptstruct::pos, Red, TPOINT::x, and TPOINT::y.
Referenced by add_point_to_list().
00080 { /* Start of point list */ 00081 void *window = edge_window; 00082 float x = edgept->pos.x; 00083 float y = edgept->pos.y; 00084 00085 c_line_color_index(window, Red); 00086 c_move(window, x, y); 00087 00088 x -= 4; 00089 y -= 12; 00090 c_draw(window, x, y); 00091 00092 x -= 2; 00093 y += 4; 00094 c_draw(window, x, y); 00095 00096 x -= 4; 00097 y += 2; 00098 c_draw(window, x, y); 00099 00100 x += 10; 00101 y += 6; 00102 c_draw(window, x, y); 00103 00104 c_make_current(window); 00105 }
void mark_split | ( | SPLIT * | split | ) |
Mark split for display.
Set up the marks list to be displayed in subsequent updates and draw the marks in the current window.
The marks are stored in the second sublist. The first sublist is left unmodified.
Definition at line 118 of file plotedges.cpp.
References c_draw(), c_line_color_index(), c_make_current(), c_move(), edge_window, Green, split_record::point1, split_record::point2, edgeptstruct::pos, TPOINT::x, and TPOINT::y.
Referenced by pick_good_seam().
00118 { 00119 void *window = edge_window; 00120 00121 c_line_color_index(window, Green); 00122 c_move (window, (float) split->point1->pos.x, (float) split->point1->pos.y); 00123 c_draw (window, (float) split->point2->pos.x, (float) split->point2->pos.y); 00124 c_make_current(window); 00125 }
void* edge_window |
* (c) Copyright 1989, Hewlett-Packard Company. ** 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 31 of file plotedges.cpp.
Referenced by display_edgepts(), mark_outline(), and mark_split().