home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
g
/
gina15.zip
/
demos
/
gredit
/
EllipseDrawer.
< prev
next >
Wrap
Text File
|
1992-02-27
|
1KB
|
37 lines
// This may look like C code, but it is really -*- C++ -*-
// Module : EllipseDrawer.C Version 1.1
// LastSCCS : 2/18/92 15:12:02
// LastEdit : "Mon Feb 17 16:44:16 1992"
// Description :
// Author :
// Copyright : GMD Schloss Birlinghoven
EllipseDrawer ::
EllipseDrawer( GnView *view, int x, int y )
: ViewObjectDrawer(view, x, y )
{
}
void EllipseDrawer::
create_view_object(int width, int height)
{
view_object = new GnEllipseO( document->gc_values(), width, height );
}
void EllipseDrawer ::
draw_feedback(int x, int y, XBoolean clear )
{
Gina_Debug( "EllipseDrawer :: draw_feedback " );
Gina_Debug( MIN(start_x, x) ); Gina_Debug( " " );
Gina_Debug( MIN(start_y, y) ); Gina_Debug( " " );
Gina_Debug( ABS(x - start_x) ); Gina_Debug( " " );
Gina_Debug( ABS(y - start_y) ); Gina_Debug( " " );
Gina_Debug_NL( clear ? "clear" : "paint" );
XDrawArc(view->get_display(), view->get_x_window(), view->get_feedback_gc(),
MIN(start_x, x), MIN(start_y, y),
ABS(x - start_x), ABS(y - start_y), 0, 64*360);
}