资源简介
简易的事故树软件 可以轻松制作事故树 简单明了不成问题
代码片段和文件信息
#include “stdafx.h“
#include “CCurve.h“
#include“EastDrawView.h“
IMPLEMENT_SERIAL(CCurveCobject1)
void CCurve::DrawStatic(CDC*pDC)
{
CPen m_pen;
m_pen.CreatePen(m_Penstylem_PenWidthm_PenColor);
CPen* pen=(CPen*)pDC->Selectobject(&m_pen);
int oldDrawingMode=pDC->SetROP2(m_DrawingMode);
m_FirstPoint=m_PointList->GetAt(0);
pDC->MoveTo(m_FirstPoint);
for(int i=0;iGetSize();i++)
{
pDC->LineTo(m_PointList->GetAt(i));
pDC->LineTo(m_PointList->GetAt(i));
}
pDC->LineTo(m_PointList->GetAt(i-1));
pDC->Selectobject(pen);
pDC->SetROP2(oldDrawingMode);
}
int CCurve::IsOnMarginPoint(CPoint point)
{
CRect rect;
for(int i=0;iGetSize();i=i+10)
{
rect=CRect(m_PointList->GetAt(i)m_PointList->GetAt(i));
rect.InflateRect(44);
if(rect.PtInRect(point))
{
m_FoundPoint=m_PointList->GetAt(i);
return i+i;
}
}
return -1;
}
void CCurve::Initial()
{
CUnit::Initial();
m_PointList=new CArray;
}
void CCurve::Serialize(CArchive &ar)
{
if(ar.IsStoring())
{
ar<yle< }
else
{
ar>>m_PenColor>>m_Penstyle>>m_PenWidth;
}
m_PointList->Serialize(ar);
// CString str;
//
// CStdioFile af(“d:\\Point.txt“CFile::modeCreate|CFile::modeReadWrite);
//
// for( int i=0; iGetSize(); i++ )
// {
// CPoint pt = m_PointList->GetAt(i);
//
// str.Format(“Point%d=(%d%d)\n“ipt.xpt.y);
// af.WriteString(str);
// }
// af.Close();
}
CCurve::CCurve()
{
Initial();
}
void CCurve::DrawMask(CDC*pDCCPoint firstCPoint second)
{
CPen m_pen;
m_pen.CreatePen(m_Penstylem_PenWidthm_PenColor);
CPen* pen=(CPen*)pDC->Selectobject(&m_pen);
pDC->MoveTo(first);
pDC->LineTo(second);
pDC->Selectobject(pen);
}
BOOL CCurve::IsInRgn(CPoint point)
{
CRect rect;
for(int i=0;iGetSize();i++)
{
rect=CRect(m_PointList->GetAt(i)m_PointList->GetAt(i));
rect.InflateRect(99);
if(rect.PtInRect(point))
return i;
}
return -1;
}
void CCurve::ShowSelectPoint(CDC *pDC)
{
CRect rect;
CBrush brush;
brush.CreateSolidBrush(RGB(25500));
CPen m_pen;
m_pen.CreatePen(PS_SOLID1RGB(00255));
CPen *OldPen=pDC->Selectobject(&m_pen);
int oldBkMode=pDC->SetBkMode(OPAQUE);
CBrush *OldBrush=pDC->Selectobject(&brush);
int oldDrawingMode=pDC->SetROP2(R2_NOTXORPEN);
for(int i=0;iGetSize();i=i+10)
{
rect=CRect(m_PointList->GetAt(i)m_PointList->GetAt(i));
rect.InflateRect(33);
pDC->Rectangle(rect);
}
pDC->Selectobject(OldPen);
pDC->SetBkMode(oldBkMode);
pDC->Selectobject(OldBrush);
pDC->SetROP2(oldDrawingMode);
}
CRect CCurve::GetBoundingRect()
{
m_MinPoint=m_MaxPoint=m_PointList->GetAt(0);
for(int i=0;iGetSize();i++)
{
m_MinPoint.x=min(m_MinPoint.xm_PointList->GetAt(i).x);
m_MinPo
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4812 2009-04-24 14:38 EasyDraw\EasyDraw\CCurve.cpp
文件 657 2002-05-28 09:57 EasyDraw\EasyDraw\CCurve.h
文件 8526 2002-06-15 16:46 EasyDraw\EasyDraw\CDLine.cpp
文件 603 2002-05-28 14:52 EasyDraw\EasyDraw\CDLine.h
文件 15702 2002-09-01 12:05 EasyDraw\EasyDraw\CEllipse.cpp
文件 1365 2002-05-31 10:49 EasyDraw\EasyDraw\CEllipse.h
文件 14047 2002-06-09 20:08 EasyDraw\EasyDraw\CEllipseArc.cpp
文件 1490 2002-06-09 00:42 EasyDraw\EasyDraw\CEllipseArc.h
文件 1535 2002-09-03 09:53 EasyDraw\EasyDraw\ChildFrm.cpp
文件 1397 2002-09-03 09:53 EasyDraw\EasyDraw\ChildFrm.h
文件 7803 2002-06-09 12:24 EasyDraw\EasyDraw\CLiEllipse.cpp
文件 566 2002-05-28 10:04 EasyDraw\EasyDraw\CLiEllipse.h
文件 7867 2002-06-21 17:18 EasyDraw\EasyDraw\CPolyBezier.cpp
文件 753 2002-05-31 10:51 EasyDraw\EasyDraw\CPolyBezier.h
文件 12076 2002-06-09 12:26 EasyDraw\EasyDraw\CPolygon.cpp
文件 731 2002-05-28 10:03 EasyDraw\EasyDraw\CPolygon.h
文件 7452 2002-06-23 21:40 EasyDraw\EasyDraw\CRectangle.cpp
文件 559 2002-05-28 10:03 EasyDraw\EasyDraw\CRectangle.h
文件 8889 2002-06-23 21:35 EasyDraw\EasyDraw\CRound.cpp
文件 605 2002-05-28 10:03 EasyDraw\EasyDraw\CRound.h
文件 8343 2002-06-24 11:30 EasyDraw\EasyDraw\CRoundArc.cpp
文件 690 2002-05-28 10:03 EasyDraw\EasyDraw\CRoundArc.h
文件 8290 2002-06-23 23:06 EasyDraw\EasyDraw\CRoundRectangle.cpp
文件 587 2002-05-28 10:03 EasyDraw\EasyDraw\CRoundRectangle.h
文件 11102 2002-07-23 08:36 EasyDraw\EasyDraw\CText.cpp
文件 899 2002-05-30 15:01 EasyDraw\EasyDraw\CText.h
文件 4944 2002-06-24 09:05 EasyDraw\EasyDraw\CUnit.cpp
文件 3883 2002-06-09 12:21 EasyDraw\EasyDraw\CUnit.h
文件 47842 2010-11-25 15:40 EasyDraw\EasyDraw\Debug\CCurve.obj
文件 40766 2010-11-25 15:40 EasyDraw\EasyDraw\Debug\CCurve.sbr
............此处省略137个文件信息
- 上一篇:数据挖掘-数据-模型-算法
- 下一篇:profibus-DP开源代码+视频
评论
共有 条评论