Mobile API Reference  MicroStrategy 2019
CGCanvas.h
Go to the documentation of this file.
1 //
2 // CGCanvas.h
3 // IPhoneChart
4 //
5 // Created by Jin, Dong on 6/11/14.
6 //
7 //
8 #ifndef MsiChart_CGCanvas_h
9 #define MsiChart_CGCanvas_h
10 
11 #import "ChartCanvas.h"
12 
13 namespace MsiChart {
14 
15  class CGCanvas:public ChartCanvas{
16  public:
17 
18 
19  CGCanvas(ChartContext* ipChartContext);
20  virtual ~CGCanvas();
21  virtual bool SaveToString(std::string& orGraphDesc);
25  virtual void SaveState();
26 
30  virtual void RestoreState();
31 
35  virtual void Clip();
36 
42  virtual void Scale(const double iX, const double iY);
43 
49  virtual void Rotate(const Point2D& irAnchor, double iRadian);
50 
54  virtual void NewPath();
55 
59  virtual void ClosePath();
60 
66  virtual void MoveTo(double iX, double iY, bool iIsCurveAnimation = false, FPoint2D* iBasePoint = NULL);
67 
73  virtual void LineTo(double iX, double iY, bool iIsCurveAnimation = false, FPoint2D* iBasePoint = NULL);
74 
84  virtual void BezierCurveTo(double iCP1X, double iCP1Y, double iCP2X, double iCP2Y, double iX, double iY);
85 
93  virtual void AddRect(float iX, float iY, float iW, float iH);
94 
104  virtual void AddArc(float iX, float iY, float iRadius, float iStartAngle, float iEndAngle, bool bAntiClockwise);
105 
115  virtual void AddNeedle(char iNeedleStyle, Point2D iBasePoint, short iAngle, float iSize);
116 
122  virtual void AddString(const Point2D& irPoint, const char* ipString);
123 
129  virtual void SetLineDash(double* ipLinePattern, short iDashNumber);
130 
135  virtual void SetLineWidth(double iLineWidth);
136 
141  virtual void SetFontSize(short iFontSize);
142 
147  virtual void SetLineJoin(EnumLineJoinType iLineJoinType);
155  virtual void SetRGBAFillColor(float iRed, float iGreen, float iBlue, float iAlpha);
156 
164  virtual void SetRGBAStrokeColor(float iRed, float iGreen, float iBlue, float iAlpha);
165 
169  virtual void FillPath();
170 
174  virtual void StrokePath();
175 
180  virtual void FillSimple(const FormatFill* ipFill, float iDarkerFactor, RGBColor* iColor = NULL, bool iHasExtraPara = false);
181 
186  virtual void FillPattern(const FormatFill* ipFill);
187 
193  virtual void FillGradient(const FormatFill* ipFill, const Rect2D& irBoundingRect, float iDarkerFactor);
194 
200  virtual void FillEdgeType(const FormatFill* ipFill, const std::vector<Point2D>& irPolygon);
201 
207  virtual void FillRadientGradient(const FormatFill* ipFill, EnumRadientGradientUsage iRGUsage, double iCPX, double iCPY, double iInnerRadius, double iOuterRadius, bool iHasExtraPara = false, int iExtraDepth = 0, int iExtraIntensity = 0);
208 
216  virtual void FillBorderMetallic(const FormatFill* ipFill, short iBorderUse, double iCPX, double iCPY, double iRadius, double iThickness);
217 
224  virtual void FillDonutOrSphere(const FormatFill* ipFill, const Rect2D& irBoundingRect, bool iIsCircularShape);
225 
233  virtual void MakeDarker(const FormatFill* ipFill, float iFactor);
234 
239  virtual void RestoreColor(const FormatFill* ipFill);
240 
245  virtual void ApplyLineFormat(const FormatLine* ipLine);
246 
253  virtual void AddFormatedText(const FormatFont* ipFont, const Point2D& irStartPoint, const std::string& irText);
254 
265  virtual void ApplyBeveledFrameToRectangle(const Rect2D& irRect, double iRotationAngle, short iBevelDepth,
266  const RGBColor& irLTColor, short iLTAlpha,
267  const RGBColor& irRBColor, short iRBAlpha);
268 
269  //Draw gauge marker
270  virtual void DrawGaugeMarker(FPoint2D* iBasePoint, Int32& iMarkerSize, Int32& iMarkerShape, float iAngle, short iNeedSize);
271 
272  // fill donut to rectangle
273  virtual void ApplyDonutToRect(const Point<double>& irStartPoint, const Point<double>& irEndPoint, const FormatFill* ipFill);
274 
280  virtual void BeginFirstFrame();
281 
288  virtual void BeginLastFrame();
289 
294  virtual void EndFrame();
295 
301  virtual void EndUnit();
302 
303  CGPoint GetCurrentPoint();
304  };
305 }
306 
307 #endif
virtual void EndUnit()
Definition: FormatFill.h:160
virtual void MakeDarker(const FormatFill *ipFill, float iFactor)
virtual void LineTo(double iX, double iY, bool iIsCurveAnimation=false, FPoint2D *iBasePoint=NULL)
virtual void FillEdgeType(const FormatFill *ipFill, const std::vector< Point2D > &irPolygon)
virtual void RestoreState()
virtual void Clip()
virtual void RestoreColor(const FormatFill *ipFill)
virtual void FillRadientGradient(const FormatFill *ipFill, EnumRadientGradientUsage iRGUsage, double iCPX, double iCPY, double iInnerRadius, double iOuterRadius, bool iHasExtraPara=false, int iExtraDepth=0, int iExtraIntensity=0)
virtual void NewPath()
virtual void SetLineWidth(double iLineWidth)
virtual void AddString(const Point2D &irPoint, const char *ipString)
virtual void AddRect(float iX, float iY, float iW, float iH)
EnumLineJoinType
Definition: ChartCanvas.h:22
Definition: FormatLine.h:59
virtual void MoveTo(double iX, double iY, bool iIsCurveAnimation=false, FPoint2D *iBasePoint=NULL)
virtual void AddArc(float iX, float iY, float iRadius, float iStartAngle, float iEndAngle, bool bAntiClockwise)
virtual void ApplyBeveledFrameToRectangle(const Rect2D &irRect, double iRotationAngle, short iBevelDepth, const RGBColor &irLTColor, short iLTAlpha, const RGBColor &irRBColor, short iRBAlpha)
CGPoint GetCurrentPoint()
virtual void FillPath()
virtual void FillGradient(const FormatFill *ipFill, const Rect2D &irBoundingRect, float iDarkerFactor)
virtual void SetLineDash(double *ipLinePattern, short iDashNumber)
#define Int32
Definition: BasicTypes.h:20
virtual void SaveState()
virtual void EndFrame()
virtual void AddNeedle(char iNeedleStyle, Point2D iBasePoint, short iAngle, float iSize)
virtual void ClosePath()
virtual void Scale(const double iX, const double iY)
virtual void SetRGBAStrokeColor(float iRed, float iGreen, float iBlue, float iAlpha)
virtual void FillBorderMetallic(const FormatFill *ipFill, short iBorderUse, double iCPX, double iCPY, double iRadius, double iThickness)
Definition: ChartContext.h:542
virtual void ApplyLineFormat(const FormatLine *ipLine)
virtual void AddFormatedText(const FormatFont *ipFont, const Point2D &irStartPoint, const std::string &irText)
Definition: ABLPlot.h:21
virtual void BeginLastFrame()
virtual void SetFontSize(short iFontSize)
virtual void SetRGBAFillColor(float iRed, float iGreen, float iBlue, float iAlpha)
virtual void BezierCurveTo(double iCP1X, double iCP1Y, double iCP2X, double iCP2Y, double iX, double iY)
virtual void FillSimple(const FormatFill *ipFill, float iDarkerFactor, RGBColor *iColor=NULL, bool iHasExtraPara=false)
CGCanvas(ChartContext *ipChartContext)
EnumRadientGradientUsage
Enumeration for radient gradient usage.
Definition: FormatFill.h:34
virtual void Rotate(const Point2D &irAnchor, double iRadian)
Definition: ChartCanvas.h:39
virtual void FillDonutOrSphere(const FormatFill *ipFill, const Rect2D &irBoundingRect, bool iIsCircularShape)
virtual void SetLineJoin(EnumLineJoinType iLineJoinType)
Definition: RGBColor.h:21
virtual void StrokePath()
#define NULL
Definition: Null.h:10
Use four Int32 values to represent a 2D rectangle.
Definition: Rect2D.h:25
virtual bool SaveToString(std::string &orGraphDesc)
virtual void FillPattern(const FormatFill *ipFill)
virtual void DrawGaugeMarker(FPoint2D *iBasePoint, Int32 &iMarkerSize, Int32 &iMarkerShape, float iAngle, short iNeedSize)
virtual void BeginFirstFrame()
Definition: CGCanvas.h:15
virtual void ApplyDonutToRect(const Point< double > &irStartPoint, const Point< double > &irEndPoint, const FormatFill *ipFill)
Definition: FormatFont.h:86