Category : Files from Magazines
Archive   : MICROCAD.ZIP
Filename : LINE.CPP

 
Output of file : LINE.CPP contained in archive : MICROCAD.ZIP
// Figure 10 for "A Little CAD with C++"
// Copyright 1988 Bruce Eckel
// Permission required to distribute source

// file: line.cpp
#include "line.hpp"
#include
#include

void line::draw() {
msm_hidecursor();
line_data [FG_X1] = x_center;
line_data [FG_X2] = x_center + 30;
line_data [FG_Y1] = y_center;
line_data [FG_Y2] = y_center + 30;
fg_drawline (FG_WHITE, FG_MODE_SET, ~0,
FG_LINE_SOLID, line_data);
msm_showcursor();
}

void line::erase() {
msm_hidecursor();
fg_drawline (FG_BLACK, FG_MODE_SET, ~0,
FG_LINE_SOLID, line_data);
msm_showcursor();
}



  3 Responses to “Category : Files from Magazines
Archive   : MICROCAD.ZIP
Filename : LINE.CPP

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/