Mobile API Reference  MicroStrategy 2019
PolygonObject.h
Go to the documentation of this file.
1 //==============================================================================================
2 // FILENAME : PolygonObject.h
3 // AUTHOR : Liang Liu
4 // CREATION : 2008-05-26
5 // Copyright (C) MicroStrategy Incorporated 2008
6 // All Rights Reserved
7 //==============================================================================================
8 #ifndef MsiChart_PolygonObject_h
9 #define MsiChart_PolygonObject_h
10 
11 #include "PDCHeader/PDCvector"
12 #include "ShapeObject.h"
13 
14 namespace MsiChart
15 {
17  class PolygonObject: public ShapeObject
18  {
19  public:
21 
28  PolygonObject(const TripleId& irTripleId, GraphObjectManager* ipManager,
29  const std::vector<Point2D>& irPolygon, GraphCollectionObject* ipParentObject = NULL,
30  bool iHasFill = true, bool iHasHole = false);
31  virtual ~PolygonObject();
32 
36  //void SetPolygon(const std::vector<Point2D>& irPolygon);
37 
41  //void GetPolygon(std::vector<Point2D>& orPolygon) const;
42 
43  // Inherit from GraphObject class.
44  virtual void Draw() const;
45  virtual void DrawOutLine();
46  virtual bool PointInObject(const Point2D& irPoint) const;
47  virtual bool PointStrictlyInObject(const Point2D& irPoint) const;
48  virtual bool ObjectInRectangle(const Rect2D& irRect);
49  virtual void GenerateImageMap(ImageMap& iorImageMap);
50  virtual void GetBoundingRect(Rect2D& orBoundingRect) const;
51  virtual std::vector<Point2D> GetPolygon() const;
52 
53  protected:
54  // Inherit from GraphObject class.
55  virtual void GetClockwisePolygon(std::vector<Point2D>& orPolygon) const;
56  virtual void FillBevel() const;
57 
58  //-----------Data member--------------------------
59  mutable std::vector<Point2D> mDevicePolygon;
60  bool mHasHole;
61  };
62 
63  inline std::vector<Point2D> PolygonObject::GetPolygon() const
64  {
65  return mDevicePolygon;
66  }
67 
68 
69 }
70 #endif
virtual void GetClockwisePolygon(std::vector< Point2D > &orPolygon) const
Represents a polygon area.
Definition: PolygonObject.h:17
virtual void GenerateImageMap(ImageMap &iorImageMap)
virtual bool PointInObject(const Point2D &irPoint) const
PolygonObject(const TripleId &irTripleId, GraphObjectManager *ipManager, const std::vector< Point2D > &irPolygon, GraphCollectionObject *ipParentObject=NULL, bool iHasFill=true, bool iHasHole=false)
virtual void DrawOutLine()
Definition: GraphCollectionObject.h:19
bool mHasHole
Definition: PolygonObject.h:60
Definition: ShapeObject.h:20
virtual bool PointStrictlyInObject(const Point2D &irPoint) const
MSynch::SmartPtr< PolygonObject > Ptr
Definition: PolygonObject.h:20
virtual std::vector< Point2D > GetPolygon() const
Definition: PolygonObject.h:63
Definition: SmartPtr.h:38
virtual void Draw() const
Definition: ABLPlot.h:21
std::vector< AreaRec * > ImageMap
Definition: ImageMap.h:99
virtual void FillBevel() const
virtual void GetBoundingRect(Rect2D &orBoundingRect) const
std::vector< Point2D > mDevicePolygon
Represents a polygon in device coordinate.
Definition: PolygonObject.h:59
#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
virtual bool ObjectInRectangle(const Rect2D &irRect)