/*--------------------------------------------------------- * This routine erases the screen. * * Results: None. * Side Effects: The screen is cleared. *--------------------------------------------------------- */ erase() { setcolor("FF"); putc('\14', stdout); putc('\33', stdout); putc('Q', stdout); outxy20(curx, cury); (void) fflush(stdout); }
/*--------------------------------------------------------- * This routine plots a single point. * * Results: None. * * Side Effects: * A single point is displayed on the screen. * The point is made the current point. *--------------------------------------------------------- */ void point(int x, int y) { setcolor("01"); putc('Q', stdout); outxy20(x, y); fputs("O01", stdout); (void) fflush(stdout); curx = x; cury = y; }
/*--------------------------------------------------------- * This routine places a label starting at the current * position. * * Results: None. * * Side Effects: * The string indicated by s starting at (curx, cury). * The current position is updated accordingly. *--------------------------------------------------------- */ void label(char *s) { setcolor("02"); putc('Q', stdout); outxy20(curx + (4096/scale), cury + (4096/scale)); putc('\6', stdout); fputs(s, stdout); putc('\33', stdout); (void) fflush(stdout); curx += ((6*4096*strlen(s)) + 4000)/scale; }