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

128 lines
3.6 KiB
C++

//-------------------------------------------------------------------------------------------------------+
// Copyright (C), 1998-2007, SH Software Co. Ltd.
// = FileName : CImageDCEx 类
// = Version : ver2.0
// = Author : zjq
// = CreateDate : 2002-09-09
// = Description: CImageDCEx 声明
// = Maintainers:
//
//-------------------------------------------------------------------------------------------------------+
#ifndef _IMAGEDRAWDCEX_H_
#define _IMAGEDRAWDCEX_H_
#ifndef _DLIST_H_
#include "DList.h"
#endif
#ifndef _IMAGEDRAWDC_H_
#include "CImageDC.h"
#endif
#ifndef _XEXPLODESTREAMBASE_H_
#include "XExplodeStreamBase.h"
#endif
#ifndef _XPOINT_H_
#include "XPoint.h"
#endif
#ifndef _XLINE_H_
#include "XLine.h"
#endif
#ifndef _XCIRCLE_H_
#include "XCircle.h"
#endif
#ifdef _XARC_H_
#include "XArc.h"
#endif
#ifndef _XPOLY2D_H_
#include "XPoly2D.h"
#endif
#ifndef _X3DFACE_H_
#include "X3DFace.h"
#endif
class GEOAPI CImageDCEx: public CImageDC, public XExplodeDraw
{
public:
CImageDCEx(CDC *pDC, const CRect &rect, COLORREF bkcolor = RGB(0,0,0));
CImageDCEx();
virtual ~CImageDCEx();
virtual BOOL IsFullExplode() const;
virtual void DrawText(const TCHAR *pszContent = NULL);
// derived from XExplodeDraw
virtual void DrawLine(const XLine &ln, double nThickness = 0.0);
virtual void DrawArc(const XArc &ar, double nThickness = 0.0);
virtual void DrawCircle(const XCircle &cir, double nThickness = 0.0);
//对指定的封闭区域填充
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);
// 3D Draw
// 根据给定的边界和凸起方向, 绘制三维外壳
virtual void DrawMesh(const XPoly2D &polyOut, const XVector3D &vtOffset);
// 显示分别连接两个区域的边缘构成的侧面
virtual void DrawMesh(const XPoly2D &polyRegion1, const XPoly2D &polyRegion2);
virtual void DrawMesh( const Adesk::UInt32 rows,
const Adesk::UInt32 columns,
const AcGePoint3d* pVertexList,
const AcGiEdgeData* pEdgeData = NULL);
// 根据给定的内外边界, 绘制三维外壳, 已经对区域进行离散
virtual void DrawShell(const XPoly2D &polyOut, const DList<XPoly2D> &lstPolyIn);
virtual void DrawShell( Adesk::UInt32 nbVertex,
const AcGePoint3d* pVertexList,
Adesk::UInt32 faceListSize,
const Adesk::Int32* pFaceList,
const AcGiEdgeData* pEdgeData = NULL);
virtual void DrawBody(const XPoly2D &polySrc, const XVector3D &vtOffset);
virtual void DrawBody(const XPoly2D &polyOut, const XPoly2D &polyIn, const XVector3D &vtOffset);
virtual void DrawFace(const X3DFace &face);
virtual void DrawBlock(const AcDbBlockTableRecord &blockRec, const XPoint &ptInsert,
const AcGeScale3d &scales, double nRot, BOOL bMakeBlock);
virtual void DrawXCurve(const XCurveSegment& curve);
virtual void DrawXLine(const XLine& line);
virtual void DrawXArc(const XArc& arc);
virtual void DrawXCircle(const XCircle& cir);
virtual void DrawX3DFace(const X3DFace&face);
virtual void SetColor(Adesk::UInt16 nColor);
virtual Adesk::UInt16 GetColor() const;
virtual const TCHAR * Desc();
void Reset();
AcDbObjectId GetLayerId() const;
Acad::ErrorStatus SetLayer(const AcDbObjectId &id);
Acad::ErrorStatus SetLayer(const TCHAR *pszLay);
Acad::ErrorStatus SetLineType(const TCHAR *pltype);
Acad::ErrorStatus SetMaterial(const TCHAR *sMaterial);
static const TCHAR * Descriptor();
protected:
Adesk::UInt16 m_nFrontColor;
void Draw(const XPointList &pts);
};
#endif