Files
envi-code/SourceCode/Code2026/tg_shs/shs_geLib/TGGiCurveStream.cpp
T

62 lines
1.5 KiB
C++
Raw Normal View History

2026-10-04 00:04:20 +08:00
//-----------------------------------------------------------------------------+
2026-09-28 15:28:50 +08:00
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
2026-10-04 00:04:20 +08:00
// = FileName : TGGiCurveStream 类
2026-09-28 15:28:50 +08:00
// = Version : ver2.0
// = Author : wlw
// = CreateDate : 2002-09-09
2026-10-04 00:04:20 +08:00
// = Description: TGGiCurveStream 定义
2026-09-28 15:28:50 +08:00
// = 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));
}
2026-10-04 00:04:20 +08:00
// 拷贝到另一个Dc去
2026-09-28 15:28:50 +08:00
void TGGiCurveStream::CopyTo(TGGiDrawStreamBase &toDc) const
{
for(int i = 0; i < m_lstCurves.Length(); i++)
{
toDc << m_lstCurves[i];
}
}
2026-10-04 00:04:20 +08:00
void TGGiCurveStream::ClipIn(const TGGePoly2D &poly) //内裁剪
2026-09-28 15:28:50 +08:00
{
TDPtrList<TGGeCurveSegment> lstIn, lstOut, lstEdge;
PolyClip(m_lstCurves, poly, lstIn, lstOut, lstEdge);
m_lstCurves.Reset();
*this << lstOut;
*this << lstEdge;
}
2026-10-04 00:04:20 +08:00
void TGGiCurveStream::ClipOut(const TGGePoly2D &poly) //外裁剪
2026-09-28 15:28:50 +08:00
{
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();
}