|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
//<2F>ļ<EFBFBD> CgmDC.h
|
|
|
|
|
|
//<2F><>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>:
|
|
|
|
|
|
//
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д: 2005-12-07
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
#include "FormatDC.h"
|
|
|
|
|
|
#include "cgm.h"
|
|
|
|
|
|
#include "../Section.h"
|
|
|
|
|
|
#include "../Mesh.h"
|
|
|
|
|
|
#include "../InsertDraw.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace NFormatWriter
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
/* define the data structure this program will use to determine which elements to exercise */
|
|
|
|
|
|
class CCgmParameter
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
CCgmParameter(void);
|
|
|
|
|
|
|
|
|
|
|
|
long colorspec; /* color specification */
|
|
|
|
|
|
long which_color_prec; /* color precision */
|
|
|
|
|
|
long font_list; /* font list */
|
|
|
|
|
|
long intpre; /* the integer precision */
|
|
|
|
|
|
long polymarker; /* draw some polymarkers */
|
|
|
|
|
|
long markertype; /* polymarker type */
|
|
|
|
|
|
long markersize; /* polymarker size */
|
|
|
|
|
|
long markercolor; /* polymarker color */
|
|
|
|
|
|
long interior; /* interior style */
|
|
|
|
|
|
long linetype; /* line types */
|
|
|
|
|
|
long linewidth; /* line thickness */
|
|
|
|
|
|
long textheight; /* the text height */
|
|
|
|
|
|
long textpath; /* the text path */
|
|
|
|
|
|
long bwcolor; /* a black/white color table*/
|
|
|
|
|
|
};
|
|
|
|
|
|
#define MAXSIZE 4096 //<2F><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܳ<EFBFBD><DCB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
class CCgmDC :
|
|
|
|
|
|
public CFormatDC
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
typedef struct cgm_colour_table
|
|
|
|
|
|
{
|
|
|
|
|
|
int index;
|
|
|
|
|
|
long rgb;
|
|
|
|
|
|
}CGMCOLOURTABLE;
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
CCgmDC(void);
|
|
|
|
|
|
virtual ~CCgmDC(void);
|
|
|
|
|
|
|
|
|
|
|
|
virtual void Initial(void); //дCGM<47>汾<EFBFBD><E6B1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>д<EFBFBD><D0B4>
|
|
|
|
|
|
virtual int OutFront(void);
|
|
|
|
|
|
virtual int OutEnd(void);
|
|
|
|
|
|
virtual CSize GetOutputSize(double cx, double cy);
|
|
|
|
|
|
virtual void SetMapSize(CSize sz) { m_mapSize = sz; }
|
|
|
|
|
|
|
|
|
|
|
|
//virtual void Draw(CInsertDraw& m_insert);
|
|
|
|
|
|
//virtual void MoveTo(double x, double y);
|
|
|
|
|
|
//virtual void LineTo(double x, double y);
|
|
|
|
|
|
// virtual void PolyLine(CCurveEx& curve, bool bDirectOut = false);
|
|
|
|
|
|
virtual void PolyLine(CPointList& dp);
|
|
|
|
|
|
virtual void SetPixel(double x, double y, COLORREF col);
|
|
|
|
|
|
virtual void Ellipse(double x1, double y1, double x2, double y2);
|
|
|
|
|
|
virtual void PaintRgn(LPPOINT sp, int count);
|
|
|
|
|
|
virtual void Draw(CSection& section,CRect8* rect=NULL);
|
|
|
|
|
|
virtual void Draw(CText& text, CCurveEx& curve);
|
|
|
|
|
|
virtual void DrawOutlineChar(LPTTPOLYGONHEADER lpph, long cbTotal, CPoint scrpt, BOOL bFill);
|
|
|
|
|
|
virtual void DrawOutlineChar(COutlineFromBitmap& ofb, CPoint scrpt, BOOL bFill);
|
|
|
|
|
|
virtual void Draw(CMesh &mesh);
|
|
|
|
|
|
virtual void Draw(CImageInsert& image);
|
|
|
|
|
|
virtual void FillSolidRect(CRect8& rect, COLORREF color);
|
|
|
|
|
|
virtual void Draw(CEllipse &elp,COLORREF Color);
|
|
|
|
|
|
virtual void Draw(CInsertDraw& m_insert);
|
|
|
|
|
|
virtual void Draw(CInsertOld& m_insert);
|
|
|
|
|
|
|
|
|
|
|
|
void WriteImageToSolidCurve(CImageInsert& image);
|
|
|
|
|
|
void WriteImage(CImageInsert& image);
|
|
|
|
|
|
void operator=(CCgmDC& dc);
|
|
|
|
|
|
|
|
|
|
|
|
virtual CSize8 GetFontSize(CSize8 sz);
|
|
|
|
|
|
|
|
|
|
|
|
virtual void SelectClipRgn(CPointList* pPointList, int nMode=RGN_AND); //<2F><><EFBFBD><EFBFBD>CGM<47><4D>EPS<50><53><EFBFBD>ļ<EFBFBD>ʱ,<2C><><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>ı߽<C4B1><DFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
float cgmGetScreenWidth8(double dw);
|
|
|
|
|
|
float cgmGetScreenHeight8(double dw);
|
|
|
|
|
|
CPoint cgmGetScreen(double x, double y);
|
|
|
|
|
|
CPoint cgmGetScreen(const CPoint2D& pt);
|
|
|
|
|
|
CPoint2D cgmGetScreen8(double x, double y);
|
|
|
|
|
|
CRect8 cgmGetScreen8(CRect8& rect);
|
|
|
|
|
|
int cgm_y(int y);
|
|
|
|
|
|
double cgm_y(double y);
|
|
|
|
|
|
void ScreenToCGM(long& x, long& y);
|
|
|
|
|
|
void ScreenToCGM(double& x, double& y);
|
|
|
|
|
|
|
|
|
|
|
|
void WriteCgmSeismic(CSection& section);
|
|
|
|
|
|
void WriteTrace(CSection& section, CGMSEISMIC& ses);
|
|
|
|
|
|
virtual void DrawScreenCurve(void* pScreenCurve, BOOL bSolid);
|
|
|
|
|
|
|
|
|
|
|
|
CCgmParameter m_cgmPar;
|
|
|
|
|
|
|
|
|
|
|
|
char m_title[50]; // CGM title
|
|
|
|
|
|
char m_descrp[50]; // CGM description
|
|
|
|
|
|
CSize m_mapSize;
|
|
|
|
|
|
CArray<CGMCOLOURTABLE, CGMCOLOURTABLE> m_arrColTab; //<2F><>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
int WriteCgmColor(COLORREF col, int nColMode); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽʱ,<2C><><EFBFBD>ص<EFBFBD><D8B5>Ǹ<EFBFBD><C7B8><EFBFBD>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int WriteCgmColor(COLORREF col, int nColMode, int colorspec);
|
|
|
|
|
|
|
|
|
|
|
|
//void SetFileName(CString strFileName);
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
//CPoint2D m_curMoveToPoint;
|
|
|
|
|
|
static CCgmDC* m_pForWrite;
|
|
|
|
|
|
static void CgmWrite(const void* pst, long len);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|