//***************************************************************************** // Copyright (c) 2004, Antivari Software Design //***************************************************************************** // // Naziv projekta : // Podsistem : // Datoteka : // Prevodilac : // Kopirano iz : // Datoteku oformio : // //***************************************************************************** // Opis: // // // //***************************************************************************** // Izmene: // // // //***************************************************************************** #ifndef AreaH #define AreaH //---------------------------------------------------------------------------- // OS, VCL i Sistemska zaglavlja //---------------------------------------------------------------------------- #include #include #include #include #include #include #include class TPovrsinaForm : public TForm { __published: // IDE-managed Components TImage *Image; TPaintBox *PaintBox; TButton *SettingsButton; TBevel *Bevel; TButton *OkButton; TButton *CancelButton; TButton *HelpButton; TEdit *PiEdit; TStatusBar *StatusBar; TComboBox *ComboBox; void __fastcall FormActivate(TObject *Sender); void __fastcall PaintBoxMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y); void __fastcall FormDestroy(TObject *Sender); void __fastcall PaintBoxPaint(TObject *Sender); void __fastcall PaintBoxMouseMove(TObject *Sender, TShiftState Shift, int X, int Y); void __fastcall SettingsButtonClick(TObject *Sender); void __fastcall FormKeyPress(TObject *Sender, char &Key); void __fastcall FormClose(TObject *Sender, TCloseAction &Action); void __fastcall CancelButtonClick(TObject *Sender); void __fastcall OkButtonClick(TObject *Sender); void __fastcall ComboBoxChange(TObject *Sender); private: // User declarations // Povrsina *********************************************************** struct point { float x,y; point *p; }; float calc_polygon( point *, point * ); float calc_triangle( point *, point *, point * ); void destroy_pointlist( point * cur ); inline float calc_determinant( float px, float py, float qx, float qy ) { return( px*qy - qx*py ); } // ******************************************************************** bool Finished; int Result; int Count(); bool CanAdd( int, int ); int LastX, LastY; bool CanAddLine( int, int ); int GetX( int ); int GetY( int ); TStringList *XPos; TStringList *YPos; TColor GuideLine; TColor AreaLine; int Precision; int Method; int LastMethod; double CalculateArea(); double CalculateLine(); void GetProperties(); void GoPaint(); bool GoClose(); void GoSaveResults(); void GoSetSubsystemResources(); int SegmentIntersection( double*, double*, double*, double* ); public: // User declarations __fastcall TPovrsinaForm(TComponent* Owner); }; //--------------------------------------------------------------------------- extern PACKAGE TPovrsinaForm *PovrsinaForm; //--------------------------------------------------------------------------- #endif