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.

74 lines
2.1 KiB
C++

//////////////////////////////////////////////////////////////////////////////
//文件 EpsDC.h
//主要功能:
//
//程序编写: 2005-12-07
/////////////////////////////////////////////////////////////////////////////
#pragma once
#include "formatdc.h"
#include ".\epswriter.h"
namespace NFormatWriter
{
class CEpsDC :
public CFormatDC
{
public:
CEpsDC(void);
virtual ~CEpsDC(void);
virtual void SetFile(CFile* pFile);
virtual void Initial(void);
virtual int OutFront(void);
virtual int OutEnd(void);
virtual void SetMapSize(CSize sz) { m_mapSize = sz; }
virtual void PolyLine(CPointList& dp);
virtual void SetPixel(double x, double y, COLORREF col);
//virtual void LineTo(double x, double y);
virtual void Ellipse(double x1, double y1, double x2, double y2);
virtual void PaintRgn(CCurveEx& curve);
virtual void PaintRgn(LPPOINT sp, int count);
virtual void Draw(CSection& section,CRect8* rect=NULL);
virtual void Draw(CText& text, CCurveEx& curve);
virtual void Draw(CImageInsert& image);
virtual void Draw(CMesh &mesh);
virtual void FillSolidRect(CRect8& rect, COLORREF color);
virtual void Draw(CInsertDraw& m_insert);
virtual void Draw(CInsertOld& m_insert);
virtual CSize8 GetFontSize(CSize8 sz);
virtual void DrawScreenCurve(void* pScreenCurve, BOOL bSolid);
virtual void DrawOutlineChar(LPTTPOLYGONHEADER lpph, long cbTotal, CPoint scrpt, BOOL bFill);
void PrintViewport(void);
void PrintBackground(COLORREF bkColor);
void operator=(CEpsDC& dc);
virtual void SelectClipRgn(CPointList* pPointList, int nMode=RGN_AND); //导出CGM或EPS等文件时,仅是为了填充符号时的边界剪辑问题
void PolyDraw(const LPPOINT plppt, const LPBYTE lpbTypes, int cCount);
void PolyBezierTo(CPoint2D* lppt, int nCount);
CPoint2D ConvertToPS(const CPoint2D & mm);
double ConvertToPS(double mm);
void GetViewport(double* pViewport); //数组长度为4
CPoint2D GetPageSize(void);
//返回的均为英寸单位
CPoint2D epsGetScreen(double x, double y);
CPoint2D epsGetScreen(const CPoint2D& pt);
double epsGetScreenWidth8(double dw);
double eps_y(double y);
void ScreenToInch(double& x, double& y);
CEpsWriter m_eps;
CSize m_mapSize; //单位是象素
};
};