You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
2.7 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#pragma once
#include "dfPluginBase.h"
namespace NPluginFormat
{
class AFX_EXT_CLASS CPluginFormat
{
public:
CPluginFormat(void* pxy);
virtual ~CPluginFormat(void);
static void* m_pXY;
static void* GetXY();
static void SetXY(void* pxy);
static dfPluginFormatReader pluginReader;
//为插件提供的接口函数
static bool dfSaveFile( const char* strFileName, int nSaveType); //将内容保存为指定扩展名的文件nSaveType:1=dfd、2=dfb、3=dml
static bool dfClearAll( void ); //清除所有内容,包括层位、元素等所有信息
static bool SetCurrentLayer( const char* strLayer ); //设置当前层
static bool SetProjection( const char* strProjection ); //设置投影格式为双狐DFD格式
static bool dfElePline( const dfPluginPline* pPline); //插入曲线
static bool dfEleRect( const dfPluginPlineRect* pRect); //插入曲线矩形,可以使用曲线修饰
static bool dfEleText( const dfPluginText* pText); //插入文本
static bool dfElePoint( dfPluginPoint dp, const char* strName, double angle ); //插入点类文字,如井位等,在双狐中可使用修饰控制
static bool dfEleEllipse( const dfPluginEllipse* pEllipse); //插入圆或椭圆
static bool dfEleArc( const dfPluginArc* pArc); //插入弧
static bool dfEleImage( const dfPluginImage* pImage); //插入图像
static bool dfEleImageBuffer(const dfPluginImageBuffer* pImageBuffer ); //插入图像,图像类型可以为“BMP、JPG、GIF、TIF、WMF、EMF、PNG”等三个字节缩写的类型文件指针中包含了文件所有的内容
static bool dfEleImageFile( const char* strFileName, dfPluginRect rect);//插入图像
static bool dfEleSurface( const dfPluginSurface* pSurface); //插入曲面
static bool dfEleXyz( double x, double y, double z ); //插入XYZ散点
static bool dfEleMergeDFFile( const char* strFileNameOrData, BOOL bMemeryData );//合并双狐图件如符号库等bMemeryData为TRUE表示strFileNameOrData中直接为DFD格式的串
static bool dfEleGriding( const dfPluginGriding* pGriding); //插入网格框
static bool dfEleFrame( const dfPluginFrame* pFrame); //插入外边框
static bool dfEleMark( const dfPluginMark* pMark ); //插入符号
static POSITION AddElement(void* pElement, int type);
static void SetElementColor(POSITION pos, COLORREF color);
static int GetCurveType(enumPlineType pt);
static CRect8 GetRect(dfPluginRect rect);
//在开始生成一个符号后,后期所有的元素将增加到该符号中,直到结束该符号生成
//符号可以嵌套使用,必须成对出现
static bool dfEleBeginCreateMark(const char* strMarkName); //开始符号生成
static bool dfEleEndCreateMark(void); //结束符号生成
protected:
static CPtrList m_markCreaterList; //符号生成列表临时保存当前符号内容调用dfEleEndCreateMark后清空
};
};
using namespace NPluginFormat;