home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 May / PCP163A.iso / Runimage / Cbuilder4 / Examples / Apps / Canvas / CANMAIN.H < prev    next >
Encoding:
C/C++ Source or Header  |  1999-01-26  |  1.5 KB  |  40 lines

  1. //----------------------------------------------------------------------------
  2. //Borland C++Builder
  3. //Copyright (c) 1987, 1998 Borland International Inc. All Rights Reserved.
  4. //----------------------------------------------------------------------------
  5. //---------------------------------------------------------------------------
  6. #ifndef canmainH
  7. #define canmainH
  8. //---------------------------------------------------------------------------
  9. #include <Classes.hpp>
  10. #include <Controls.hpp>
  11. #include <StdCtrls.hpp>
  12. #include <Forms.hpp>
  13. #include <ExtCtrls.hpp>
  14. const int  MaxPoints    = 15;  // Number of points to be drawn 
  15.  
  16. struct TRPoint {
  17.   float X, Y;
  18. };
  19. //---------------------------------------------------------------------------
  20. class TForm1 : public TForm
  21. {
  22. __published:    // IDE-managed Components 
  23.     TTimer *Timer1;
  24.     void __fastcall FormCreate(TObject *Sender);
  25.     void __fastcall FormPaint(TObject *Sender);
  26.     void __fastcall FormResize(TObject *Sender);
  27.     void __fastcall Timer1Timer(TObject *Sender);
  28. private:        // User declarations
  29.     TRPoint     Points[MaxPoints];
  30.     float       Rotation;     // in radians
  31.     int         PointCount;
  32.     void __fastcall RotatePoints();
  33. public:         // User declarations
  34.     virtual __fastcall TForm1(TComponent* Owner);
  35. };
  36. //---------------------------------------------------------------------------
  37. extern TForm1 *Form1;
  38. //---------------------------------------------------------------------------
  39. #endif
  40.