Mobile API Reference  MicroStrategy 2019
DepthLineObject.h
Go to the documentation of this file.
1 //==============================================================================================
2 // FILENAME : DepthLineObject.h
3 // AUTHOR : Xin Liu
4 // CREATION : 10/20/08
5 // Copyright (C) MicroStrategy, Inc. 2008
6 //==============================================================================================
7 
8 #ifndef MSICHART_DEPTHLINEOBJECT_H
9 #define MSICHART_DEPTHLINEOBJECT_H
10 
11 #include "ShapeObject.h"
12 
13 namespace MsiChart
14 {
19  {
20  public:
22 
30  DepthLineObject(const TripleId& irTripleId, GraphObjectManager* ipManager,const std::vector<Point2D>& irPoints,
31  Int32 iDepth, Int32 iAngle, GraphCollectionObject* ipParentObject, bool iIsVertical = true,
32  bool iUseDarkerColor = false);
33 
34  DepthLineObject(const TripleId& irTripleId, GraphObjectManager* ipManager,
35  const Point2D& irStartPoint, const Point2D& irEndPoint, Int32 iDepth, Int32 iAngle,
36  GraphCollectionObject* ipParentObject, bool iIsVertical, bool iUseDarkerColor = false);
37 
38  DepthLineObject(const FPoint2D& irStartPoint, const FPoint2D& irEndPoint, DepthLineObject* ipDepthLine);
39 
40  virtual ~DepthLineObject();
41 
42  //virtual functions from GraphObject
43  virtual void Draw() const;
44  virtual void DrawOutLine();
45  virtual bool PointInObject(const Point2D& irPoint);
46  virtual bool ObjectInRectangle(const Rect2D& irRect);
47  virtual void GenerateImageMap(ImageMap& iorImageMap);
48 
49  //pure virtual function from ShapeObject
50  virtual void GetBoundingRect(Rect2D& orBoundingRect) const;
51 
57  virtual bool IsBefore(DepthLineObject::Ptr iDepthLinePtr) const;
58 
66  virtual void SplitAtTangentPoints(std::vector<DepthLineObject::Ptr>& iorDepthLines);
67 
74  virtual void SplitAtIntersections(DepthLineObject::Ptr iDepthLinePtr, std::vector<DepthLineObject::Ptr>& iorDepthLines);
75 
79  virtual void RestoreDepthLine();
80 
85  void SetIndex(Int32 i);
90  Int32 GetIndex();
91 
92  protected:
93  virtual void GetClockwisePolygon(std::vector<Point2D>& orPolygon) const;
94 
99  void hCalculateSections(const std::vector<Point2D>& irPoints);
104  void hFillSection(size_t iSectionIndex) const;
105 
111  void hGetPolygonByDepth(Int32 iDepth, std::vector<FPoint2D>& orPolygon) const;
112 
113  std::vector<Polygon2D> mSections;
114  std::vector<FPoint2D> mPolygon;
119  mutable size_t mSectionIndex;
120  bool mIsVertical;
124 
125  };
127  {
128  mIndex = i;
129  }
131  {
132  return mIndex;
133  }
134 }
135 
136 #endif
void hCalculateSections(const std::vector< Point2D > &irPoints)
virtual void GetBoundingRect(Rect2D &orBoundingRect) const
virtual void SplitAtTangentPoints(std::vector< DepthLineObject::Ptr > &iorDepthLines)
size_t mSectionIndex
The index of the polyline sections, which is used for FormatFill.
Definition: DepthLineObject.h:119
void hGetPolygonByDepth(Int32 iDepth, std::vector< FPoint2D > &orPolygon) const
virtual void SplitAtIntersections(DepthLineObject::Ptr iDepthLinePtr, std::vector< DepthLineObject::Ptr > &iorDepthLines)
FPoint2D mStartPoint
Indicates the start point of straight depth line.
Definition: DepthLineObject.h:115
Definition: GraphCollectionObject.h:19
std::vector< Polygon2D > mSections
A list of polygons all the sections of the depth polyline.
Definition: DepthLineObject.h:113
virtual bool IsBefore(DepthLineObject::Ptr iDepthLinePtr) const
bool mIsStraightDepthLine
Indicates whether current depth line is a straight depth line;.
Definition: DepthLineObject.h:122
Int32 mDepth
The depth value.
Definition: DepthLineObject.h:117
std::vector< FPoint2D > mPolygon
A polygon for straight depth line.
Definition: DepthLineObject.h:114
Int32 GetIndex()
Definition: DepthLineObject.h:130
void SetIndex(Int32 i)
Definition: DepthLineObject.h:126
Definition: ShapeObject.h:20
virtual void RestoreDepthLine()
bool mIsVertical
Indicates whether the depth polyline is vertical or horizontal.
Definition: DepthLineObject.h:120
#define Int32
Definition: BasicTypes.h:20
FPoint2D mEndPoint
Indicates the end point of straight depth line.
Definition: DepthLineObject.h:116
virtual bool PointInObject(const Point2D &irPoint)
virtual void GenerateImageMap(ImageMap &iorImageMap)
Definition: SmartPtr.h:38
virtual void GetClockwisePolygon(std::vector< Point2D > &orPolygon) const
virtual void DrawOutLine()
virtual void Draw() const
Definition: ABLPlot.h:21
std::vector< AreaRec * > ImageMap
Definition: ImageMap.h:99
Int32 mIndex
Identify current depth line. For debugging.
Definition: DepthLineObject.h:123
bool mUseDarkerColor
Indicates whether darker color should be used or not.
Definition: DepthLineObject.h:121
Int32 mAngle
The depth direction.
Definition: DepthLineObject.h:118
void hFillSection(size_t iSectionIndex) const
DepthLineObject(const TripleId &irTripleId, GraphObjectManager *ipManager, const std::vector< Point2D > &irPoints, Int32 iDepth, Int32 iAngle, GraphCollectionObject *ipParentObject, bool iIsVertical=true, bool iUseDarkerColor=false)
Definition: DepthLineObject.h:18
virtual bool ObjectInRectangle(const Rect2D &irRect)
Definition: GraphObjectManager.h:37
Use four Int32 values to represent a 2D rectangle.
Definition: Rect2D.h:25
Definition: Common.h:397
MSynch::SmartPtr< DepthLineObject > Ptr
Definition: DepthLineObject.h:21