Mobile API Reference  MicroStrategy 2019
PolyLineObject.h
Go to the documentation of this file.
1 //==============================================================================================
2 // FILENAME : PolyLineObject.h
3 // AUTHOR : Liang Liu
4 // CREATION : 2008-7-25
5 // Copyright (C) MicroStrategy Incorporated 2008
6 // All Rights Reserved
7 //==============================================================================================
8 #ifndef MsiChart_PolyLineObject_h
9 #define MsiChart_PolyLineObject_h
10 
11 #include "PDCHeader/PDCvector"
12 #include "GraphObject.h"
13 
14 namespace MsiChart
15 {
17  class PolyLineObject: public LineObject
18  {
19  public:
21 
28  PolyLineObject(const TripleId& irTripleId, GraphObjectManager* ipManager,
29  const std::vector<Point2D>& irPoints, GraphCollectionObject* ipParentObject = NULL,
30  bool iHasLineFormat = true, bool iIsClosePath = false);
31  virtual ~PolyLineObject();
32 
33  // Public methods
39  void Extend(std::vector<Point2D>& irPoints, Int32 iPosition);
40 
45  //void AddPoint(const Point2D& irPoint);
52  //bool SetPoint(const Point2D& irPoint, unsigned Int32 iIndex);
59  //bool GetPoint(Point2D& orPoint, unsigned Int32 iIndex) const;
60 
62  //void Clear();
63 
64  // virtual functions from GraphObject
65  virtual void Draw() const;
66  virtual bool PointInObject(const Point2D& irPoint);
67  virtual bool ObjectInRectangle(const Rect2D& irRect);
68  virtual void GenerateImageMap(ImageMap& iorImageMap);
69  virtual void DrawOutLine();
70  virtual Int32 DistanceToPoint(const Point2D& irPoint);
71  virtual std::vector<Point2D> GetLinePoints() const;
72 
77  void GetPolygons(std::vector<Polygon2D>& orPolygons) const;
78 
79  protected:
80  //pure virtual functions from GraphObject
81  virtual void GetClockwisePolygon(std::vector<Point2D>& orPolygon) const;
82 
83  void hGetOnePolygon(const std::vector<Point2D>& irLinePoints, Polygon2D& orPolygon) const;
84 
85  void SetPath() const;
86 
87  std::vector<Point2D> mLinePoints;
88 
89  bool mIsClosePath;
90  };
91  inline std::vector<Point2D> PolyLineObject::GetLinePoints() const
92  {
93  return mLinePoints;
94  }
95 }
96 #endif
virtual bool PointInObject(const Point2D &irPoint)
virtual bool ObjectInRectangle(const Rect2D &irRect)
PolyLineObject(const TripleId &irTripleId, GraphObjectManager *ipManager, const std::vector< Point2D > &irPoints, GraphCollectionObject *ipParentObject=NULL, bool iHasLineFormat=true, bool iIsClosePath=false)
Definition: GraphCollectionObject.h:19
std::vector< Point2D > mLinePoints
Store all the points of the poly line in device coordinates.
Definition: PolyLineObject.h:87
virtual std::vector< Point2D > GetLinePoints() const
Definition: PolyLineObject.h:91
virtual void GenerateImageMap(ImageMap &iorImageMap)
void Extend(std::vector< Point2D > &irPoints, Int32 iPosition)
std::vector< Point2D > Polygon2D
Definition: GraphObject.h:25
Delegates Poly lines.
Definition: PolyLineObject.h:17
#define Int32
Definition: BasicTypes.h:20
void hGetOnePolygon(const std::vector< Point2D > &irLinePoints, Polygon2D &orPolygon) const
MSynch::SmartPtr< PolyLineObject > Ptr
Definition: PolyLineObject.h:20
virtual void Draw() const
Clear all the points in the polyline.
Definition: GraphObject.h:38
void GetPolygons(std::vector< Polygon2D > &orPolygons) const
bool mIsClosePath
Indicates whether current polyline is a close path or not.
Definition: PolyLineObject.h:89
virtual void GetClockwisePolygon(std::vector< Point2D > &orPolygon) const
Definition: ABLPlot.h:21
std::vector< AreaRec * > ImageMap
Definition: ImageMap.h:99
virtual Int32 DistanceToPoint(const Point2D &irPoint)
virtual void DrawOutLine()
#define NULL
Definition: Null.h:10
Definition: GraphObjectManager.h:37
Use four Int32 values to represent a 2D rectangle.
Definition: Rect2D.h:25
Definition: Common.h:397