home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 May / Pcwk5b98.iso / Borland / Cplus45 / BC45 / GDIDEMO.PAK / LINE.H < prev    next >
C/C++ Source or Header  |  1995-08-29  |  1KB  |  40 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows - (C) Copyright 1991, 1993 by Borland International
  3. //   MoveToLineTo demo window header
  4. //----------------------------------------------------------------------------
  5. #ifndef __LINE_H
  6. #define __LINE_H
  7.  
  8. #include "demobase.h"
  9.  
  10. // MoveToLineTo demo constants
  11. const int  MaxPoints    = 15;  // Number of points to be drawn 
  12. const int  IconicPoints = 6;   // Number of points to draw when iconized
  13.  
  14. struct TRPoint {
  15.   float X, Y;
  16. };
  17.  
  18. class TMoveToLineToWindow : public TBaseDemoWindow {
  19.   public:
  20.     TMoveToLineToWindow();
  21.     
  22.     void TimerTick();
  23.     void Paint(TDC& dc, BOOL, TRect&);
  24.  
  25.   protected:
  26.     void EvSize(UINT, TSize& Size);
  27.   
  28.   private:
  29.     TRPoint     Points[MaxPoints];
  30.     float       Rotation;     // in radians
  31.     int         PointCount;
  32.     BOOL        Iconized;
  33.     void        RotatePoints();
  34.  
  35.   DECLARE_CASTABLE;
  36.   DECLARE_RESPONSE_TABLE(TMoveToLineToWindow);
  37. };
  38.  
  39. #endif
  40.