63 lines
1.5 KiB
C++
63 lines
1.5 KiB
C++
//-----------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
|
|
// = FileName : TGGiCurveStream 类
|
|
// = Version : ver2.0
|
|
// = Author : wlw
|
|
// = CreateDate : 2002-09-09
|
|
// = Description: TGGiCurveStream 定义
|
|
// = Maintainers:
|
|
//
|
|
//-----------------------------------------------------------------------------+
|
|
#include "StdAfx.h"
|
|
#include "TGGiCurveStream.h"
|
|
#include "TchGlobalCurveFunc.h"
|
|
|
|
TGGiCurveStream::TGGiCurveStream()
|
|
{
|
|
|
|
}
|
|
|
|
void TGGiCurveStream::DrawXCurve(const TGGeCurveSegment &cv,double nThick)
|
|
{
|
|
m_lstCurves.Append(new TGGeCurveSegment(cv));
|
|
}
|
|
|
|
// 拷贝到另一个Dc去
|
|
void TGGiCurveStream::CopyTo(TGGiDrawStreamBase &toDc) const
|
|
{
|
|
for(int i = 0; i < m_lstCurves.Length(); i++)
|
|
{
|
|
toDc << m_lstCurves[i];
|
|
}
|
|
}
|
|
|
|
void TGGiCurveStream::ClipIn(const TGGePoly2D &poly) //内裁剪
|
|
{
|
|
TDPtrList<TGGeCurveSegment> lstIn, lstOut, lstEdge;
|
|
PolyClip(m_lstCurves, poly, lstIn, lstOut, lstEdge);
|
|
m_lstCurves.Reset();
|
|
|
|
*this << lstOut;
|
|
*this << lstEdge;
|
|
}
|
|
|
|
void TGGiCurveStream::ClipOut(const TGGePoly2D &poly) //外裁剪
|
|
{
|
|
TDPtrList<TGGeCurveSegment> lstIn, lstOut, lstEdge;
|
|
PolyClip(m_lstCurves, poly, lstIn, lstOut, lstEdge);
|
|
m_lstCurves.Reset();
|
|
|
|
*this << lstOut;
|
|
*this << lstEdge;
|
|
}
|
|
|
|
const TCHAR * TGGiCurveStream::Descriptor()
|
|
{
|
|
return _T("TGGiCurveStream");
|
|
}
|
|
|
|
const TCHAR * TGGiCurveStream::Desc()
|
|
{
|
|
return Descriptor();
|
|
}
|