All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
drawedg.h File Reference
#include "scrollview.h"
#include "crakedge.h"

Go to the source code of this file.

Functions

ScrollViewcreate_edges_window (ICOORD page_tr)
 
void draw_raw_edge (ScrollView *fd, CRACKEDGE *start, ScrollView::Color colour)
 

Function Documentation

ScrollView* create_edges_window ( ICOORD  page_tr)

Definition at line 44 of file drawedg.cpp.

44  {
45  ScrollView* image_win; //image window
46 
47  //create the window
48  image_win = new ScrollView (IMAGE_WIN_NAME, IMAGE_XPOS, IMAGE_YPOS, 0, 0, page_tr.x (), page_tr.y ());
49  return image_win; //window
50 }
#define IMAGE_WIN_NAME
Definition: drawedg.cpp:30
ScrollView * image_win
Definition: pgedit.cpp:107
inT16 y() const
access_function
Definition: points.h:56
#define IMAGE_YPOS
Definition: drawedg.cpp:33
inT16 x() const
access function
Definition: points.h:52
#define IMAGE_XPOS
Definition: drawedg.cpp:31
void draw_raw_edge ( ScrollView fd,
CRACKEDGE start,
ScrollView::Color  colour 
)

Definition at line 62 of file drawedg.cpp.

64  {
65  CRACKEDGE *edgept; //current point
66 
67  fd->Pen(colour);
68  edgept = start;
69  fd->SetCursor(edgept->pos.x (), edgept->pos.y ());
70  do {
71  do
72  edgept = edgept->next;
73  //merge straight lines
74  while (edgept != start && edgept->prev->stepx == edgept->stepx && edgept->prev->stepy == edgept->stepy);
75 
76  //draw lines
77  fd->DrawTo(edgept->pos.x (), edgept->pos.y ());
78  }
79  while (edgept != start);
80 }
void Pen(Color color)
Definition: scrollview.cpp:726
ICOORD pos
Definition: crakedge.h:30
void DrawTo(int x, int y)
Definition: scrollview.cpp:531
CRACKEDGE * prev
Definition: crakedge.h:34
inT16 y() const
access_function
Definition: points.h:56
void SetCursor(int x, int y)
Definition: scrollview.cpp:525
inT8 stepx
Definition: crakedge.h:31
inT16 x() const
access function
Definition: points.h:52
CRACKEDGE * next
Definition: crakedge.h:35
inT8 stepy
Definition: crakedge.h:32