OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimAnnotationMultiLineObject.h
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // Author: Garrett Potts
6 //
7 //*************************************************************************
8 // $Id: ossimAnnotationMultiLineObject.h 9968 2006-11-29 14:01:53Z gpotts $
9 #ifndef ossimAnnotationMultiLineObject_HEADER
10 #define ossimAnnotationMultiLineObject_HEADER
12 #include <ossim/base/ossimIpt.h>
14 
16 {
17 public:
19  ossimAnnotationMultiLineObject(const std::vector<ossimPolyLine>& lineList,
20  unsigned char r=255,
21  unsigned char g=255,
22  unsigned char b=255,
23  long thickness=1)
24  :ossimAnnotationObject(r, g, b, thickness),
25  thePolyLineList(lineList)
26  {
28  }
29 
31  unsigned char r=255,
32  unsigned char g=255,
33  unsigned char b=255,
34  long thickness=1)
35  :ossimAnnotationObject(r, g, b, thickness)
36  {
37  thePolyLineList.push_back(lineList);
39  }
40 
41 
44  thePolyLineList(rhs.thePolyLineList),
45  theBoundingRect(rhs.theBoundingRect)
46  {
47  }
48 
49  virtual ossimObject* dup()const
50  {
51  return new ossimAnnotationMultiLineObject(*this);
52  }
53 
54  virtual void applyScale(double x,
55  double y);
56  virtual ossimAnnotationObject* getNewClippedObject(const ossimDrect& rect)const;
57  virtual bool intersects(const ossimDrect& rect)const;
58  virtual void draw(ossimRgbImage& anImage)const;
59  virtual std::ostream& print(std::ostream& out)const;
60  virtual void getBoundingRect(ossimDrect& rect)const
61  {
62  rect = theBoundingRect;
63  }
64  virtual bool isPointWithin(const ossimDpt& imagePoint)const;
65  virtual void computeBoundingRect();
66 
67  virtual const vector<ossimPolyLine>& getPolyLineList()const
68  {
69  return thePolyLineList;
70  }
71 
72  virtual vector<ossimPolyLine>& getPolyLineList()
73  {
74  return thePolyLineList;
75  }
76  virtual void setPolyLine(const ossimPolyLine& line)
77  {
78  thePolyLineList.clear();
79  thePolyLineList.push_back(line);
80  }
81 protected:
82  vector<ossimPolyLine> thePolyLineList;
84 
86 };
87 
88 #endif
ossim_uint32 x
virtual void draw(ossimRgbImage &anImage) const =0
#define OSSIMDLLEXPORT
virtual bool intersects(const ossimDrect &rect) const =0
ossim_uint32 y
virtual ossimAnnotationObject * getNewClippedObject(const ossimDrect &rect) const =0
virtual vector< ossimPolyLine > & getPolyLineList()
ossimAnnotationMultiLineObject(const std::vector< ossimPolyLine > &lineList, unsigned char r=255, unsigned char g=255, unsigned char b=255, long thickness=1)
virtual std::ostream & print(std::ostream &out) const
Generic print method.
virtual const vector< ossimPolyLine > & getPolyLineList() const
#define TYPE_DATA
Definition: ossimRtti.h:339
virtual void applyScale(double x, double y)=0
virtual void getBoundingRect(ossimDrect &rect) const
virtual void setPolyLine(const ossimPolyLine &line)
ossimAnnotationMultiLineObject(const ossimPolyLine &lineList, unsigned char r=255, unsigned char g=255, unsigned char b=255, long thickness=1)
ossimAnnotationMultiLineObject(const ossimAnnotationMultiLineObject &rhs)
virtual bool isPointWithin(const ossimDpt &imagePoint) const
virtual void computeBoundingRect()=0
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23