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.
65 lines
1.8 KiB
C++
65 lines
1.8 KiB
C++
//////////////////////////////////////////////////////////////////////////////
|
|
//文件 FormatDC.h
|
|
//主要功能:
|
|
//
|
|
//程序编写: 2005-12-07
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#pragma once
|
|
#include "..\stdafx.h"
|
|
#include "..\XyDcEx.h"
|
|
#include ".\outlinefrombitmap.h"
|
|
|
|
namespace NFormatWriter
|
|
{
|
|
|
|
class CFormatDC : public CXyDCExport
|
|
{
|
|
public:
|
|
CFormatDC(void);
|
|
virtual ~CFormatDC(void);
|
|
|
|
//为了输出连续曲线,必须在派生类中重写
|
|
//该函数可以将MoveTo、LineTo、PolyLine(CCurveEx)全部处理
|
|
virtual void PolyLine(CPointList& dp) = 0;
|
|
|
|
virtual void DrawOutlineChar(LPTTPOLYGONHEADER lpph, long cbTotal, CPoint scrpt, BOOL bFill);
|
|
virtual void DrawOutlineChar(COutlineFromBitmap& ofb, CPoint scrpt, BOOL bFill);
|
|
void DrawOutlineText(CString strText, CPoint scrpt, double angle, BOOL bFill);
|
|
|
|
virtual void DrawScreenCurve(void* pScreenCurve, BOOL bSolid);
|
|
void DrawSeismicTraceWiggleLeft(void* pScreenCurve, double x0);
|
|
void DrawSeismicTraceWiggleRight(void* pScreenCurve, double x0);
|
|
|
|
void WriteString(CString value); //写字符串
|
|
|
|
CFile* GetFile(void);
|
|
BOOL OpenWrite(LPCTSTR lpszPathName, bool bBinary); //打开写文件
|
|
void Close(); //关闭写文件
|
|
|
|
virtual void SetFile(CFile* pFile);
|
|
virtual void Initial(void) = 0;
|
|
virtual int OutFront(void) = 0;
|
|
virtual int OutEnd(void) = 0;
|
|
virtual CSize GetOutputSize(double cx, double cy);
|
|
virtual void SetMapSize(CSize sz) {}
|
|
|
|
protected:
|
|
UINT m_wFontGlyph;
|
|
|
|
CFile* m_pFile; //需要写的文件
|
|
bool m_bDeleteFile; //是否在结束时删除m_pFile指针
|
|
bool m_bBinaryFile; //打开写的文件是否是二进制的
|
|
|
|
CString m_strTemp;
|
|
|
|
BOOL m_bNoWriteWhiteInImage; //写图像文件时是否输出白色的色块
|
|
|
|
FIXED FloatToFixed(double d);
|
|
int mapFXY(FIXED fxy);
|
|
};
|
|
|
|
};
|
|
|
|
using namespace NFormatWriter;
|