#include "grphics.h"
#include "crakedge.h"
Go to the source code of this file.
Create the edges window.
* (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 }
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 }