www.pudn.com > MyDraw1225.rar > Arc.cpp


// Arc.cpp: implementation of the CArc class. 
// 
////////////////////////////////////////////////////////////////////// 
 
#include "stdafx.h" 
#include "MyDraw.h" 
#include "Arc.h" 
 
#ifdef _DEBUG 
#undef THIS_FILE 
static char THIS_FILE[]=__FILE__; 
#define new DEBUG_NEW 
#endif 
 
////////////////////////////////////////////////////////////////////// 
// Construction/Destruction 
////////////////////////////////////////////////////////////////////// 
IMPLEMENT_SERIAL(CArc,CObject,1) 
 
CArc::CArc() 
{ 
	bIsSelected=false; 
	startX=0; 
	startY=0; 
	endX=80; 
	endY=80; 
	Direction=0; 
 
	LinePen.lopnWidth.x=3; 
	LinePen.lopnColor=RGB(0,0,0); 
	LinePen.lopnStyle=PS_SOLID; 
} 
 
CArc::~CArc() 
{ 
} 
 
void CArc::Serialize(CArchive & ar) 
{ 
	CObject::Serialize(ar); 
    if(ar.IsLoading()) 
    { 
		ar>>startX>>startY>>endX>>endY>>Direction>> 
			LinePen.lopnWidth.x>>LinePen.lopnColor>>LinePen.lopnStyle; 
    } 
	else 
	{ 
        ar<