home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 15 / CD_ASCQ_15_070894.iso / vrac / mar94cad.zip / RECTANG1.C < prev    next >
C/C++ Source or Header  |  1994-02-15  |  581b  |  19 lines

  1. /*  RECTANG1.C program to draw a rectangle with
  2.        lower left and upper right point
  3.               (c)1994, Anthony Hotchkiss and CADalyst  */
  4.  
  5. #include  <stdio.h>
  6. #include  "adslib.h"
  7.  
  8. void rectan1 (void)
  9. {
  10.    ads_point pt1, pt2, pt3, pt4;
  11.  
  12.    ads_getpoint(NULL,"\nLower left point: ",pt1);
  13.    ads_getpoint(NULL,"\nUpper right point: ",pt3);
  14.    pt2[Z] = pt4[Z] = pt1[Z];   pt2[X] = pt3[X]; pt2[Y] = pt1[Y];
  15.    pt4[X] = pt1[X]; pt4[Y] = pt3[Y];
  16.    ads_command(RTSTR,"line",RTPOINT,pt1,RTPOINT,pt2,
  17.        RTPOINT,pt3,RTPOINT,pt4,RTSTR,"c",0);
  18. } /* rectan1 */
  19.