SRGScaleBar Class
class SRGScaleBar
NEW OC6.01 Scalebars are designed to allow you to place independant axis scales near your chart display.Defined in: SRGScaleBar.h
Class Members
SRGDisplayBase* m_pDisplay
A cached display pointer this component work with
BOOL m_bShowAxis
Flag for axis line drawing
BOOL m_bShowTick
Flag for tick marks drawing of the axis
SRGScaleType m_nScaleType
Scale type of this axis scale
int m_nAxisWidth
The axis line width
COLORREF m_AxisColor
The color of the axis line
int m_nAxisPenStyle
The line style of the axis line
double m_dConvertRatio
When using RATIO_CONVERSION, it stores the conversion ratio
What kind of conversion this scale will use?
virtual void Serialize(CArchive& ar)
virtual void DrawForeground()
Override this function to do custom drawing
virtual void DrawGrids()
Draw the grid lines on top of the display component
inline virtual double DoConversion(double dValue)
Used when the conversion mode is FUNC_CONVERSION
virtual void CreateLabels()
Create the axis labels and the tick marks position
virtual void GetBoundingPolygon(CPoint * points,int nPointCount = 5)
Calculate the bounding rectangle of this component
virtual void SetParent(SRGraph* pParent)
Set the parent graph of this component
virtual void DrawFill()
Fill the background of this component
virtual void DrawShadow()
Draw shadow for this component
virtual void DrawBorder()
Draw border for this component
virtual void BeforeDraw()
Do the final setting before drawing
virtual void Draw(CDC* pDC, CWnd* pWnd)
The top most draw function of this component
virtual SRGDisplayBase* FindAttachDisplay()
Find the attach display component if not set by SetDisplay()
virtual void SetDisplay(SRGDisplayBase* pDisplay)
Method to explicitly attach the specified display component
virtual SRGDisplayBase* GetDisplay()
Returns a pointer to the attached display component
virtual void SetRTAngles()
Sets all labels perpendicular to the line between the start and end points
inline void SetTickColor(COLORREF clr)
Set the tick marks color
inline COLORREF GetTickColor()
Get Tick marks color
inline void SetAxisWidth(int nWidth)
Set axis width, inlined
int GetAxisWidth()
Get the axis width, inlined
inline void SetAxisColor(COLORREF clr)
Set axis color, inlined
inline COLORREF GetAxisColor()
Get axis color, inlined
inline void SetShowAxis(BOOL bShowAxis)
Set the flag of show axis, inlined
inline BOOL GetShowAxis()
Check if need to show axis, inlined
inline void SetShowTick(BOOL bShowTick)
Set flag for showing tick marks, inlined
inline BOOL GetShowTick()
Check if need to show tick marks, inlined
inline void SetScaleType(SRGScaleType nType )
Set the scale type, inlined
inline SRGScaleType GetScaleType()
Get the scale type, inlined
inline void SetConversionMode(int nMode)
Set the conversion mode, inlined
inline int GetConversionMode()
Get conversion mode, inlined
inline void SetConversionRatio(double dRatio)
Set conversion ratio, used when conversion mode is RATIO_CONVERSION, inlined
inline double GetConversionRatio()
Get conversion ratio, inlined