📄 shape.h
字号:
#if !defined(AFX_SHAPE_H__29109CEB_22DA_4DF1_B07E_DAD59B136407__INCLUDED_)
#define AFX_SHAPE_H__29109CEB_22DA_4DF1_B07E_DAD59B136407__INCLUDED_
#include "LineSet.h" // Added by ClassView
#include "Data.h" // Added by ClassView
#include "Axis.h" // Added by ClassView
#include "Line.h" // Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Shape.h : header file
//
//#define MAX 200
/////////////////////////////////////////////////////////////////////////////
// CShape view
#include <afxtempl.h>
class CShape : public CView
{
public:
CShape();
// protected constructor used by dynamic creation
DECLARE_DYNCREATE(CShape)
// Attributes
public:
CShape(CData data[],CAxis axis);
// Operations
public:
void Create(CData data[]);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CShape)
//}}AFX_VIRTUAL
// Implementation
public:
inline CString GetTitle(){return m_Title;}
inline void SetTitle(CString title){m_Title=title;}
CLineSet* GetLine();
void SetLine(int style,int width,COLORREF color);
double GetInN();
void SetInN(double inN);
int GetVibrateKind();
void SetVibrateKind(int vibrate);
void InPutData();
double GetWaveLength();
void SetWaveLength(double wavelength);
double GetAngle();
void SetAngle(double angle);
int GetThickKind();
void SetThickKind( int kind);
void CalDaona(double wavelength,int VibrateKinds);
double* GetDaona();
double CalReflectance(double wavelength,int VibrateKinds);
int GetShapeofkind();
void SetShapeofkind(int kind);
int GetLayerNum();
void CalAngles();
void Compute(CDC* pDC,CRect rectClient);
void SetAxisWidth(int width);
void SetColor(COLORREF colorx, COLORREF colory);
void SetText(CString title);
void SetText(CString lablex,CString labley);
void SetAxis(long minx,long maxx,long miny,long maxy,double intervalx,double intervaly);
void ShowData(CDC* pDC);
//CAxis GetAxis();
//used to judge which picture to be drawn
CData* Getm_Shape();
CAxis GetAxis();
virtual ~CShape();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
// Generated message map functions
protected:
//{{AFX_MSG(CShape)
// NOTE - the ClassWizard will add and remove member functions here.
virtual void OnDraw(CDC* pDC);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
void DrawTitle(CDC* pDC );
CLineSet m_Line;
double m_InN;
CAxis m_Axis;
int m_Shapeofkinds; // 1:Reflectance-Wavelength 2: 透射率-波长
double m_Daona[2];
int m_ThickKinds; //1:physical 2:optical
double m_InAngle;
double m_WaveLength; //reference wavelength
int m_VibrateKinds; //1: s ,2:p 3:avarage
CString m_Title;
CData m_Shape[MAX];
public:
void SetCenter(int x,int y);
void DrawPicture(CDC* pDC,int Kinds);
CArray<float,float>m_fWaveLength,m_Reflectance,m_Transistance,m_Absorption;//used to setdown data to show
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_SHAPE_H__29109CEB_22DA_4DF1_B07E_DAD59B136407__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -