108 lines
2.6 KiB
C++
108 lines
2.6 KiB
C++
#pragma once
|
|
|
|
#include "Whiptk/whip_toolkit.h"
|
|
//#include "SLNKDWF.h"
|
|
|
|
#include "TextFormatter.h"
|
|
|
|
class CFoundText
|
|
{
|
|
public:
|
|
WT_Text m_FoundText;
|
|
CString m_FoundLayer;
|
|
WT_Logical_Point m_FoundAt;
|
|
};
|
|
|
|
class CFromTo {
|
|
public:
|
|
CFromTo(COLORREF pFrom, COLORREF pTo): from(pFrom), to(pTo){};
|
|
CFromTo(){};
|
|
COLORREF from; COLORREF to;
|
|
};
|
|
|
|
class CWhip2DCState
|
|
{
|
|
public:
|
|
CWhip2DCState();
|
|
~CWhip2DCState();
|
|
void Reset();
|
|
|
|
// CW2D2PNG
|
|
long myRound(double x) const // Dikke kans dattie zo inline wordt
|
|
{
|
|
ATLASSERT(x >= LONG_MIN-0.5);
|
|
ATLASSERT(x <= LONG_MAX+0.5);
|
|
if (x >= 0)
|
|
return (long) (x+0.5);
|
|
return (long) (x-0.5);
|
|
}
|
|
|
|
LOGFONT m_logfont;
|
|
WT_Integer32 m_spacing;
|
|
WT_Integer32 m_height; // Niet afgeronde waarde voor SetupPixel
|
|
HPEN m_pen;
|
|
HFONT m_font;
|
|
HRGN m_hrgn;
|
|
|
|
KTextFormator m_kfm;
|
|
HBRUSH m_brush; int m_alpha;
|
|
COLORREF m_DCclr;
|
|
HDC myDC;
|
|
|
|
CAtlRegExp<> reLayers; // Welke layers moeten aan
|
|
BOOL bLayerVisible; // Current Layer visible?
|
|
BOOL bIsSymbolLayer;
|
|
CString m_activeLayerName;
|
|
|
|
CSimpleArray<CString> m_Layernames;
|
|
CAtlArray<CFoundText> m_FoundTexts;
|
|
|
|
WT_Logical_Box m_orgMinMax;
|
|
WT_Logical_Box m_MinMax;
|
|
WT_Units m_Units; // Remember them after processing
|
|
|
|
double m_ClipWidth, m_ClipHeight;
|
|
COLORREF m_paperColor;
|
|
BOOL m_forcePaper; // forceer een bepaalde papierkleur
|
|
BOOL m_forceBW;
|
|
BOOL m_Maximize;
|
|
BOOL m_centerImage;
|
|
double m_mul; // schaal onze DWF-coordinaten naar bitmap coordinaten
|
|
|
|
CSize m_Size;
|
|
BOOL findIt;
|
|
CString MapBuilder;
|
|
CPoint LPfindXY;
|
|
WT_Object_Node foundNode;
|
|
CString foundNodeLayer;
|
|
CString foundTextLabel;
|
|
CString foundTextLayer;
|
|
double foundEdgeAngle;
|
|
double foundEdgeDistance;
|
|
WT_Logical_Point DWFfindXY;
|
|
int geekFontSize;
|
|
|
|
int m_vertexList_size;
|
|
CPoint *m_vertexList; // tempArray to hold translated Points. Used over and over
|
|
|
|
CAtlMap<COLORREF, CFromTo> m_replaceColors; // paper, from, to
|
|
|
|
void AlphaPolygon(LPPOINT lpPoints, int nCount) const;
|
|
void erasePaper (WT_File & file);
|
|
CPoint *new_DWFToLP(WT_Point_Set const &pts);
|
|
CPoint DWFToLP(WT_Logical_Point const &pt);
|
|
|
|
WT_Logical_Point LPToDWF(CPoint pt);
|
|
void LPToDWG(CPoint pt, double &resX, double &resY);
|
|
void DWGExtents(double &resminX, double &resminY,
|
|
double &resmaxX, double &resmaxY);
|
|
WT_Result my_process_font (WT_Font & font);
|
|
WT_Result drawBoundText (WT_Text & text, WT_File & file);
|
|
void Marker( CPoint pt);
|
|
void SetExtents(WT_Logical_Box MinMax);
|
|
void ColorPenAndBrush (WT_File & file);
|
|
void DrawGeekBox(CPoint *pts, int nCount);
|
|
void DrawGeekText(WT_Text &text);
|
|
};
|
|
|