DLLineShape.h

Go to the documentation of this file.
00001 #ifndef _DLLINESHAPE_H_
00002 #define _DLLINESHAPE_H_
00003 
00004 #include "DLShape.h"
00005 #include "DLPoint.h"
00006 
00029 class DLLineShape : public DLShape
00030 {
00031    public:
00032         
00036    DLLineShape( );
00037 
00042    DLLineShape(const DLLineShape & orig);
00043 
00044 
00049    const DLLineShape & operator=(const DLLineShape & right);
00050 
00056    DLLineShape(const DLPoint &pp1, const DLPoint &pp2) : DLShape()
00057       { p1.x = pp1.x; p1.y = pp1.y;  p2.x = pp2.x; p2.y = pp2.y; };
00058 
00066    DLLineShape(int x1, int y1, int x2, int y2): DLShape()
00067       {p1.x = x1; p1.y = y1;  p2.x = x2; p2.y = y2; };
00068 
00072    virtual ~DLLineShape() {};
00073 
00074 
00079    void dlDrawShape( DLImage *image);
00080 
00085    DLPoint dlGetFirstPoint() const;
00086 
00091    void dlSetFirstPoint(const DLPoint &pt);
00092    
00097    DLPoint dlGetSecondPoint() const;
00098 
00103    void dlSetSecondPoint(const DLPoint &pt);
00104 
00105    protected:
00107    DLPoint p1;
00109    DLPoint p2;    
00110 };  
00111 
00112 #endif

DOCLIB is being developed under contract by a collaboration between:
The Laboratory for Language and Media Processing
Unviersity of Maryland, College Park
and
Booz | Allen | Hamilton

All Rights Reserved, 2003-2007