Mobile API Reference  MicroStrategy 2019
NeedleObject.h
Go to the documentation of this file.
1 //==============================================================================================
2 // FILENAME : NeedleObject.h
3 // AUTHOR : Xin Liu
4 // CREATION : 3/05/09
5 // Copyright (C) MicroStrategy, Inc. 2009
6 //==============================================================================================
7 
8 #ifndef MSICHART_NEEDLEOBJECT_H
9 #define MSICHART_NEEDLEOBJECT_H
10 
11 #include "ShapeObject.h"
12 
13 namespace MsiChart
14 {
18  class NeedleObject: public ShapeObject
19  {
20  public:
22 
29  NeedleObject(const TripleId& irTripleId,
30  GraphObjectManager* ipManager, // manager who create the object
31  const Point2D& irBasePoint, Int32 iSize, float iAngle,
33  GraphCollectionObject* ipParentObject = NULL);
34 
35  virtual ~NeedleObject();
36 
37  //virtual functions from GraphObject
38  virtual void Draw() const;
39  virtual bool ObjectInRectangle(const Rect2D& irRect);
40  virtual Point2D GetDataPoint();
41  // virtual void DrawOutLine();
42  // virtual bool PointInObject(const Point2D& irPoint);
43  // virtual void GenerateImageMap(ImageMap& iorImageMap);
44 
45 
46  //pure virtual function from ShapeObject
47  virtual void GetBoundingRect(Rect2D& orBoundingRect) const;
48 
49  protected:
50  virtual void GetClockwisePolygon(std::vector<Point2D>& orPolygon) const;
51 
52  private:
56  void hGetClockwisePolygon();
57 
63  void hGetNeedleStyle(Int32* opPointNumber, const Int32** opPoints) const;
64 
68  unsigned char hConvertToLocalNeedleStyleIndex(EnumDSSGraphGaugeNeedleStyle iNeedleStyle) const;
69 
70 
71  //data members
72  EnumDSSGraphGaugeNeedleStyle mNeedleStyle;
73  Point2D mBasePoint;
74  Int32 mSize;
75  float mAngle;
76  std::vector<Point2D> mPolygon;
77  std::vector<Point<float> > mFloatPolygon;
78  };
79 
80 }
81 
82 #endif
Definition: NeedleObject.h:18
virtual bool ObjectInRectangle(const Rect2D &irRect)
virtual void Draw() const
Definition: GraphCollectionObject.h:19
Definition: DSSIPhoneEnums.h:2132
Definition: ShapeObject.h:20
#define Int32
Definition: BasicTypes.h:20
virtual Point2D GetDataPoint()
MSynch::SmartPtr< NeedleObject > Ptr
Definition: NeedleObject.h:21
Definition: SmartPtr.h:38
NeedleObject(const TripleId &irTripleId, GraphObjectManager *ipManager, const Point2D &irBasePoint, Int32 iSize, float iAngle, EnumDSSGraphGaugeNeedleStyle iNeedleStyle=DssGraphGaugeNeedleStyleSimple, GraphCollectionObject *ipParentObject=NULL)
Definition: ABLPlot.h:21
EnumDSSGraphGaugeNeedleStyle
Definition: DSSIPhoneEnums.h:2130
virtual void GetBoundingRect(Rect2D &orBoundingRect) const
#define NULL
Definition: Null.h:10
Definition: GraphObjectManager.h:37
virtual void GetClockwisePolygon(std::vector< Point2D > &orPolygon) const
Use four Int32 values to represent a 2D rectangle.
Definition: Rect2D.h:25
Definition: Common.h:397