127 lines
3.8 KiB
C++
127 lines
3.8 KiB
C++
//-------------------------------------------------------------------------------------------------------+
|
|||
|
|
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
|
||
|
|
// = FileName : TImageDrawDCEx 类
|
||
|
|
// = Version : ver2.0
|
||
|
|
// = Author : wlw
|
||
|
|
// = CreateDate : 2002-09-09
|
||
|
|
// = Description: TImageDrawDCEx 声明
|
||
|
|
// = Maintainers:
|
||
|
|
//
|
||
|
|
//-------------------------------------------------------------------------------------------------------+
|
||
|
|
#ifndef _TIMAGEDRAWDCEX_H_
|
||
|
|
#define _TIMAGEDRAWDCEX_H_
|
||
|
|
|
||
|
|
#ifndef _TDPTRLIST_H_
|
||
|
|
#include "TDPtrList.h"
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#ifndef _TIMAGEDRAWDC_H_
|
||
|
|
#include "TImageDrawDC.h"
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#ifndef _TGGIEXPLODEDRAWBASE_H_
|
||
|
|
#include "TGGiExplodeDrawBase.h"
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#ifndef _TADSGEPOINT3D_H_
|
||
|
|
#include "TADSGePoint3d.h"
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#ifndef _TGGELINE_H_
|
||
|
|
#include "TGGeLine.h"
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#ifndef _TGGECIRCLE_H_
|
||
|
|
#include "TGGeCircle.h"
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#ifdef _TGGEARC_H_
|
||
|
|
#include "TGGeArc.h"
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#ifndef _TGGEPOLY2D_H_
|
||
|
|
#include "TGGePoly2D.h"
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#ifndef _TGGE3DFACE_H_
|
||
|
|
#include "TGGe3DFace.h"
|
||
|
|
#endif
|
||
|
|
|
||
|
|
class GEOAPI TImageDrawDCEx: public TImageDrawDC, public TGGiExplodeDrawBase
|
||
|
|
{
|
||
|
|
public:
|
||
|
|
TImageDrawDCEx(CDC *pDC, const CRect &rect, COLORREF bkcolor = RGB(0,0,0));
|
||
|
|
TImageDrawDCEx();
|
||
|
|
virtual ~TImageDrawDCEx();
|
||
|
|
|
||
|
|
virtual BOOL IsFullExplode() const;
|
||
|
|
virtual void DrawText(const TCHAR *pszContent = NULL);
|
||
|
|
// derived from TGGiExplodeDrawBase
|
||
|
|
virtual void DrawLine(const TGGeLine &ln, double nThickness = 0.0);
|
||
|
|
virtual void DrawArc(const TGGeArc &ar, double nThickness = 0.0);
|
||
|
|
virtual void DrawCircle(const TGGeCircle &cir, double nThickness = 0.0);
|
||
|
|
|
||
|
|
//对指定的封闭区域填充
|
||
|
|
virtual void DrawSolid(const TGGePoly2D &polyOutline);
|
||
|
|
virtual void DrawHatch(const TGGePoly2D &polyOutline, const TCHAR *pszPattern, double nScale);
|
||
|
|
virtual void DrawHatchEx(const TGGePoly2D &polyOutline, const TCHAR *pszPattern, double nScale,double rotation);
|
||
|
|
|
||
|
|
// 3D Draw
|
||
|
|
// 根据给定的边界和凸起方向, 绘制三维外壳
|
||
|
|
virtual void DrawMesh(const TGGePoly2D &polyOut, const TVector3D &vtOffset);
|
||
|
|
// 显示分别连接两个区域的边缘构成的侧面
|
||
|
|
virtual void DrawMesh(const TGGePoly2D &polyRegion1, const TGGePoly2D &polyRegion2);
|
||
|
|
virtual void DrawMesh( const Adesk::UInt32 rows,
|
||
|
|
const Adesk::UInt32 columns,
|
||
|
|
const AcGePoint3d* pVertexList,
|
||
|
|
const AcGiEdgeData* pEdgeData = NULL);
|
||
|
|
|
||
|
|
// 根据给定的内外边界, 绘制三维外壳, 已经对区域进行离散
|
||
|
|
virtual void DrawShell(const TGGePoly2D &polyOut, const TDPtrList<TGGePoly2D> &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 TGGePoly2D &polySrc, const TVector3D &vtOffset);
|
||
|
|
virtual void DrawBody(const TGGePoly2D &polyOut, const TGGePoly2D &polyIn, const TVector3D &vtOffset);
|
||
|
|
|
||
|
|
virtual void DrawFace(const TGGe3DFace &face);
|
||
|
|
|
||
|
|
virtual void DrawBlock(const AcDbBlockTableRecord &blockRec, const TADSGePoint3d &ptInsert,
|
||
|
|
const AcGeScale3d &scales, double nRot, BOOL bMakeBlock);
|
||
|
|
|
||
|
|
virtual void DrawXCurve(const TGGeCurveSegment& curve);
|
||
|
|
|
||
|
|
virtual void DrawXLine(const TGGeLine& line);
|
||
|
|
|
||
|
|
virtual void DrawXArc(const TGGeArc& arc);
|
||
|
|
|
||
|
|
virtual void DrawXCircle(const TGGeCircle& cir);
|
||
|
|
|
||
|
|
virtual void DrawX3DFace(const TGGe3DFace&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 TADSGePointList &pts);
|
||
|
|
|
||
|
|
};
|
||
|
|
#endif
|