www.pudn.com > DrawGrInDlg.rar > Line.h


// Line.h: interface for the CLine class. 
// 
////////////////////////////////////////////////////////////////////// 
 
#if !defined(AFX_LINE_H__C6ACEDC4_2BE5_11D6_836B_5254AB372662__INCLUDED_) 
#define AFX_LINE_H__C6ACEDC4_2BE5_11D6_836B_5254AB372662__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
 
#include "BaseGr.h" 
#include "LineData.h" 
 
class CLine : public CBaseGr   
{ 
public: 
	CLine(); 
	virtual ~CLine(); 
protected: 
	CList LineDataList; 
	BOOL WithDash; 
	BOOL WithDot; 
	int xCoorDeta; 
	int xDeta; 
	int yCoorDeta; 
	int yDeta; 
	int DotSize; 
	CBaseGr::Align TitleMode; 
	CBaseGr::Align LegendMode; 
public: 
	void SetWithDash(BOOL bWithDash=TRUE) { WithDash=bWithDash; } 
	void SetWithDot(BOOL bWithDot=TRUE) { WithDot = bWithDot;} 
	void SetDotSize(int nDs=3) { DotSize = nDs;} 
	void SetTitleMode(CBaseGr::Align eTitleMode) { TitleMode = eTitleMode;} 
	void SetLegendMode(CBaseGr::Align eLegendMode) { LegendMode = eLegendMode;} 
	void AddLineData(CLineData*& pLineData);	 
	virtual void DrawCurveLine(CDC* pDC,int LeftTopx,int LeftTopy,int RightBottomx,int RightBottomy); 
	virtual void DrawLegend(CDC* pDC,int Startx,int Starty,int Width=30,Align Mode=TOP,COLORREF FontColor=RGB(0,0,0)); 
protected: 
	virtual void DrawContent(CDC* pDC,int LeftTopx,int LeftTopy,int RightBottomx,int RightBottomy); 
	virtual void DrawCoordinate(CDC* pDC,int LeftTopx,int LeftTopy,int RightBottomx,int RightBottomy,BOOL WithDash=FALSE); 
}; 
 
#endif // !defined(AFX_LINE_H__C6ACEDC4_2BE5_11D6_836B_5254AB372662__INCLUDED_)