#include <stdio.h>

#include "mygraph.h"
#include "mydebug.h"
#include "Xroutines.h"

extern int DEBUG;

void read_point( point * the_point){

     if ( DEBUG & POINT_LEVEL ) {
	fprintf(stderr,"DEBUG: Entering read_point\n");
     }

     printf ("Enter the coordinates of a point\n");
     printf ("Enter the X coordinate (As an integer) => ");
     scanf ("%d", &(the_point->x) );
     printf ("Enter the Y coordinate (As an integer) => ");
     scanf ("%d", &(the_point->y) );

     if ( DEBUG & POINT_LEVEL ) {
	fprintf(stderr,"DEBUG: Exiting read_point, point read (%d,%d)\n",
	     the_point->x,the_point->y);
     }
}

void print_point ( point a_point) {

     if ( DEBUG & POINT_LEVEL ) {
	fprintf(stderr,"DEBUG: entering print_point, the point is (%d,%d)\n",
	     a_point.x,a_point.y);
     }

     printf ("( %d , %d )",a_point.x,a_point.y);

     if ( DEBUG & POINT_LEVEL ) {
	 fprintf(stderr,"DEBUG: exiting print_point\n");
     }

}

void dc_draw_point (point a_point, Widget drawing_board) {
    SetPixel(drawing_board,a_point.x,a_point.y);
}

