Files
gjm 164968b62e chore
把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
2026-10-04 00:04:20 +08:00

173 lines
3.6 KiB
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//-----------------------------------------------------------------------------+
// Copyright (C), 1998-2007, SH Software Co. Ltd.
// = FileName : XDcStream 类
// = Version : ver2.0
// = Author : zjq
// = CreateDate : 2002-09-09
// = Description: XDcStream 声明
// = 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
// 设备流
// 用来存储几何
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);
public://带裁剪
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:
CPtrArray m_lstClip; //所有裁剪物性
// add by zjq on 100714 解决门窗和柱加粗时墙体缺口问题时添加
// 裁剪输出时,可能会有裁剪边界是不想裁剪的,此时可以在绘制时临时设置为false直接输出,用后记得恢复为true
bool m_bClip; //是否裁剪输出(默认为true)
};
#endif