GlobalFunction.h
资源名称:44757463.rar [点击查看]
上传用户:lj3531212
上传日期:2007-06-18
资源大小:346k
文件大小:2k
源码类别:
绘图程序
开发平台:
Visual C++
- #ifndef XGL_GRAPGSOFT_GLOABALFUNCTON_HEADER_FILE_2004_3_30
- #define XGL_GRAPGSOFT_GLOABALFUNCTON_HEADER_FILE_2004_3_30
- //GlobalFunction.h
- //全局函数
- #include "afxtempl.h"
- class CShape;
- float GetDistance(CPoint ptStart,CPoint ptEnd);
- float GetDistance(float flStartx,float flStarty,float flEndx,float flEndy);
- float GetAngleFromPoints(CPoint ptCenter,CPoint ptStart,CPoint ptEnd);
- float GetAngleFromPoints(float x1,float y1,float x2,float y2,float x3,float y3);
- CRect GetRectFromPoint(CPoint pt1,CPoint pt2);
- int GetPointStateToRect(float x,float y,CRect rectRes);
- int GetLineStateToRect(CPoint ptStart,CPoint ptEnd,CRect rect);
- int GetLineStateToRect(float flStartx,float flStarty,float flEndx,float ftEndy,CRect rect);
- void DrawLine(CDC* pDC,CPoint ptStart,CPoint ptEnd,COLORREF color,int penWidth,UINT nStyle = BS_SOLID);
- void DrawLine(CDC* pDC,float flSX,float flSY,float flEX,float flEY,COLORREF color,int penWidth,UINT nStyle = BS_SOLID);
- void DrawOutRectPoint(CDC *pDC,CPoint ptCenter,COLORREF color);
- void DrawOutRectPoint(CDC *pDC,float flx,float fly,COLORREF color);
- int BezierCurve(CDC *pDC,CPoint ptArray[],int n);
- int GetPtStateToBigLine(float flSx,float flSy,float flEx,float flEy,float flEnlarge,float x,float y);
- int GetCutPtFrom2Line(CPoint pt1,CPoint pt2,CPoint pt3,CPoint pt4,CPoint* pPtRtn);
- int GetCutPtFrom2Line(float x[],float y[],float *xR,float *yR);
- float GetDisFromPtToLine(CPoint point,CPoint ptLineS,CPoint ptLineE);
- float GetDisFromPtToLine(float x,float y,float Sx,float Sy,float Ex,float Ey);
- float GetLineRate(CPoint ptS,CPoint ptE);
- float GetLineRate(float flx1,float fly1,float flx2,float fly2);
- bool IsPtInRect(float left,float top,float right,float bottom,float x,float y);
- CShape* GetShapeClass(CString strClassName);
- #endif