home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.mdf / SourceCode / Tutorial / Cookbook / 35.UserPath / UserPathView.m < prev   
Encoding:
Text File  |  1993-01-18  |  545 b   |  28 lines

  1.  
  2. /* Generated by Interface Builder */
  3.  
  4. #import "UserPathView.h"
  5. #import <dpsclient/wraps.h>    // For PS and DPS function prototypes
  6.  
  7. @implementation UserPathView
  8.  
  9.  
  10. - drawSelf:(NXRect *)rects :(int)rectCount
  11. {
  12.     short    data[6] = {10, 10, 400, 10, 200, 300};
  13.     char    ops[4] = {dps_moveto, dps_lineto,
  14.                 dps_lineto,dps_closepath};
  15.     short    boundingBox[4] = {0, 0, 400, 300};
  16.  
  17.     NXEraseRect (&bounds);
  18.     PSsetgray(NX_BLACK);
  19.     PSsetlinewidth(10.0);
  20.  
  21.     DPSDoUserPath(data, 6, dps_short, ops, 4, boundingBox, 
  22.         dps_ustroke);
  23.     return self;
  24. }
  25.  
  26.  
  27. @end
  28.