Files
envi-code/SourceCode/Code2026/inc/SlideDc.h
T
2026-09-28 15:28:50 +08:00

83 lines
1.2 KiB
C++

#pragma once
#if (ARX < 17)
#include "ios.h"
#endif
#if (ARX > 15)
#include <fstream>
#else
#include <fstream.h>
#endif
DECLARE_HANDLE(HDIB);
typedef struct SPoint
{
double x,y,z;
}SPOINT;
typedef struct SLine
{
SPoint pt1;
SPoint pt2;
int nColorIndex;
}SLINE;
typedef struct SPoly
{
int nPts;
SPoint* pts;
}SPOLY;
typedef struct SSolid
{
SPoly poly;
int nColorIndex;
}SSOLID;
#ifdef EARTHWORM_EXPORT
#define DLLIMPEXP __declspec(dllexport)
#else
#define DLLIMPEXP __declspec(dllimport)
#endif
class DLLIMPEXP CSlideDc
{
public:
CSlideDc(CDC *pDC, const CRect &rect, COLORREF bkcolor = RGB(0,0,0));
CSlideDc();
virtual ~CSlideDc();
void InitDC(CDC *pDC, const CRect &rect, COLORREF bkcolor = RGB(0,0,0));
void SetDC(CDC *pDc);
BOOL Redraw();
BOOL PaintSlide(const TCHAR *pszSlideFile);
private:
void Fill(COLORREF cr);
void Reset();
BOOL ReadFromSlide(const TCHAR *pszSlideFile);
BOOL PaintSlide();
private:
short m_nIT;
double m_nRotation;
BOOL m_bAutoScale;
BOOL m_bUniformScale;
BOOL m_bHighlight;
COLORREF m_bkColor;
CDC *m_pDC;
CRect m_rectDC;
HDIB m_hDIB;
CPalette *m_palDIB;
AcArray<SLine*> m_arLines;
AcArray<SSolid*> m_arSolid;
};