Files

172 lines
3.6 KiB
C++
Raw Permalink Normal View History

2026-10-04 00:04:20 +08:00
//-----------------------------------------------------------------------------+
2026-09-28 15:28:50 +08:00
// Copyright (C), 1998-2007, SH Software Co. Ltd.
2026-10-04 00:04:20 +08:00
// = FileName : XDcStream 类
2026-09-28 15:28:50 +08:00
// = Version : ver2.0
// = Author : zjq
// = CreateDate : 2002-09-09
2026-10-04 00:04:20 +08:00
// = Description: XDcStream 声明
2026-09-28 15:28:50 +08:00
// = Maintainers:
//
//-----------------------------------------------------------------------------+
#ifndef _XDcStream_H_
#define _XDcStream_H_
#ifndef _XPOLY2D_H_
#include "XPoly2D.h"
#endif
#ifndef _XPOINT_H_
#include "XPoint.h"
#endif
#ifndef _XCURVESEGMENT_H_
#include "XCurveSegment.h"
#endif
#ifndef _XPOINTLISTT_H_
#include "XPointList.h"
#endif
#ifndef _X3DFACE_H_
#include "X3DFace.h"
#endif
#ifndef _ENTITY_H_
#include "Entity.h"
#endif
#ifndef _XLINE_H_
#include "XLine.h"
#endif
#ifndef _XARC_H_
#include "XArc.h"
#endif
#ifndef _XCIRCLE_H_
#include "XCircle.h"
#endif
#ifndef _XHATCHh_H_
#include "XHatch.h"
#endif
#ifndef _XRECTANGLE_H_
#include "XRectAngle.h"
#endif
#ifndef _XSOLID_H_
#include "XSolid.h"
#endif
#ifndef _XSOLIDCURVE_H_
#include "XSolidCurve.h"
#endif
#ifndef _XDcClip_H_
#include "XDcClip.h"
#endif
#ifndef _XBlockRef_H_
#include "XBlockRef.h"
#endif
#ifndef _DLIST_H_
#include "DList.h"
#endif
2026-10-04 00:04:20 +08:00
// 设备流
// 用来存储几何
2026-09-28 15:28:50 +08:00
class GEOAPI XDcStream
{
public:
friend class XPushDc;
XDcStream();
virtual ~XDcStream();
virtual void PushClip(const XPoly2D& poly,int flag = 0);
virtual void PopClip();
virtual void DrawXPoint(const XPoint&);
virtual void DrawXCurve(const XCurveSegment&curve,double nThick = 0) = 0;
virtual void DrawXPoly(const XPoly2D&,double nThick = 0);
virtual void DrawXPoints(const XPointList&pts);
virtual void DrawX3DFace(const X3DFace&);
virtual void DrawXEntity(const Entity&);
virtual void DrawSolid(const XPoly2D &polyOutline);
virtual void DrawHatch(const XPoly2D &polyOutline, const TCHAR *pszPattern, double nScale);
virtual void DrawHatchEx(const XPoly2D &polyOutline, const TCHAR *pszPattern, double nScale,double rotation);
virtual void DrawEntity(const AcDbEntity& ent)const;
virtual void DrawBlock(const AcDbBlockTableRecord &blockRec, const XPoint &ptInsert,const AcGeScale3d &scales, double nRot, BOOL bMakeBlock);
virtual const TCHAR * Desc();
virtual Adesk::Boolean IsDragging() const;
// add by zjq on 100714
bool GetClipFlg();
void SetClipFlg(bool bTrue);
XDcStream & operator << (const XPointList &pts);
XDcStream & operator << (const X3DFace &face);
XDcStream & operator << (const Entity &e);
2026-10-04 00:04:20 +08:00
public://带裁剪
2026-09-28 15:28:50 +08:00
XDcStream & operator << (const XPoint &pt);
XDcStream & operator << (const XCurveSegment &seg);
XDcStream & operator << (const XLine &l);
XDcStream & operator << (const XArc &arc);
XDcStream & operator << (const XCircle &cir);
XDcStream & operator << (const DList<XCurveSegment> &);
XDcStream & operator << (const XPoly2D &poly);
XDcStream & operator << (const XRectAngle &box);
XDcStream & operator << (const XHatch &hatch);
XDcStream & operator << (const XSolid &solid);
XDcStream & operator << (const XSolidCurve &curve);
XDcStream & operator << (const XBlockRef& block);
XDcStream & operator << (const AcDbEntity&ent);
protected:
bool HasClip()const;
void DeleteAll();
protected:
2026-10-04 00:04:20 +08:00
CPtrArray m_lstClip; //所有裁剪物性
2026-09-28 15:28:50 +08:00
2026-10-04 00:04:20 +08:00
// add by zjq on 100714 解决门窗和柱加粗时墙体缺口问题时添加
// 裁剪输出时,可能会有裁剪边界是不想裁剪的,此时可以在绘制时临时设置为false直接输出,用后记得恢复为true
bool m_bClip; //是否裁剪输出(默认为true)
2026-09-28 15:28:50 +08:00
};
#endif