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.

1077 lines
26 KiB
C

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#ifndef GDBX_DEFINE_H
#define GDBX_DEFINE_H
#include "../DrawModel/Rect8.h"
struct GDBXLINETO
{
double x; //线段x
double y; //线段y
};
struct xPoint
{
double x, y;
};
typedef struct {
uint8_t Red; //Red color (0-255)
uint8_t Green; //Green color (0-255)
uint8_t Blue; //Blue color (0-255)
uint8_t Reserved; //Not used
} GCOLORREF;
struct GDBXMapInfo
{
int nVersion; // 版本号
int nMapUnit; // 地图单位 (如1: 米, 2: 千米, 3: 公里等)
int nMapType; // 图幅类型
int nMapSecret; // 地图保密级别 (-1: 不指定0: 公开1: 机密2: 秘密3: 绝密)
int nMapLevel; // 地图级别 (1: 国家级2: 省级等)
int nYAxis; // Y轴方向 (1: 正北, 0: 非正北)
int nCoordSysType; // 坐标系类型 (1: 地理坐标, 2: 投影坐标)
long paperBackColor; // 纸张背景色
CRect8 llSpace; // 经纬度范围 (最小经度, 最小纬度)
CRect8 modelSpace; // 模型空间范围 (最小X, 最小Y)
CSize8 paperSize; // 纸张尺寸 (宽度, 高度)
double dMapLeft; // 地图左边界 (最大范围到工作范围的差值, 工作范围为实际范围)
double dMapTop; // 地图上边界
double dMapRight; // 地图右边界
double dMapBottom; // 地图下边界
double dMapScale; // 比例尺
CString sPasswd; // 密码
CString sName; // 图名
CString sMapDept; // 地图单位
CString sMapAuthor; // 地图作者
CString sAuthor; // 作者
CString sReviewer; // 审核人
CString sOriginalScale; // 原始比例尺
CString sDate; // 日期
CString sMapClass; // 图幅分类
CString sRemark; // 备注
CString sMapMarkLabel; // 标注
CString sCustomInfo; // 层级信息
void clear()
{
nVersion = 0;
nMapUnit = 0;
nMapType = 0;
nMapSecret = 0;
nMapLevel = 0;
nYAxis = 0;
nCoordSysType = 0;
paperBackColor = 0;
llSpace = CRect8(0,0,0,0);
modelSpace = CRect8(0, 0, 0, 0);
paperSize = CSize8(0, 0);
dMapLeft = 0;
dMapTop = 0;
dMapRight = 0;
dMapBottom = 0;
dMapScale = 0;
sPasswd = "";
sName = "";
sMapDept = "";
sMapAuthor = "";
sAuthor = "";
sReviewer = "";
sOriginalScale = "";
sDate = "";
sMapClass = "";
sRemark = "";
sMapMarkLabel = "";
sCustomInfo = "";
}
};
//投影参数
struct GDBXProjection
{
int nWorkID;
int nEarthType; // 椭球体类型 (椭球体索引号) Datum
int nProjType; // 投影类型 (投影方式索引号) type
int nBandType; // 分带方法(0:六度带,1:三度带,2:不分带)
int nBand; // 带号 ZAB
int nCoordType; // 坐标类型 0-用户坐标 1-经纬度坐标 2-大地坐标
int nCoordUnit; // 坐标单位 = 0 单位(毫米) = 1 单位(米)
double dAxisLong; // 椭球体长轴 A
double dAxisShort; // 椭球体短轴 B
double dCenterMeridian; // 中央子午线(弧度,下同) (中央经线) Lon0
double dLatOrig; // 原点纬度 Lat0
double dExPand1; // 扩展1 Lon1
double dLatFirst; // 第一纬线 (割线1) Lat1
double dExPand2; // 扩展2 Lon2
double dLatSecond; // 第二纬线 (割线2) Lat2
double dAzimuth;
double dScaleFactor; // 比例因子 k0
double dOffsetEast; // 东偏移 x0
double dOffsetNorth; // 北偏移 y0
CString sWorkName;
void clear()
{
nWorkID = 0;
nEarthType = 0;
nProjType = 0;
nBandType = 0;
nBand = 0;
nCoordType = 0;
nCoordUnit = 0;
dAxisLong = 0;
dAxisShort = 0;
dCenterMeridian = 0;
dLatOrig = 0;
dExPand1 = 0;
dLatFirst = 0;
dExPand2 = 0;
dLatSecond = 0;
dAzimuth = 0;
dScaleFactor = 0;
dOffsetEast = 0;
dOffsetNorth = 0;
sWorkName = "";
}
};
struct GDBXMeasure
{
int nMapUnit; // 地图单位MapUnit="1"
double dPaperScale; // 纸张比例PaperScale="503104.000000"
double dDpiX; // 水平分辨率DPIX="96.000000"
double dDpiY; // 垂直分辨率DPIY="96.000000"
double dDepth; // 深度Depth="1.000000"
double dLevel; // 等级Level="1.000000"
void clear()
{
nMapUnit = 0;
dPaperScale = 0;
dDpiX = 0;
dDpiY = 0;
dDepth = 0;
dLevel = 0;
}
};
struct GDBXSegments
{
int nSegmentCount; // 段数
int nBigPtsBlock; // 是否有大点块
int nBigPtsLen0; // 大点数据长度
CString sBigPts0; // 数据段 不需要bese64以及zlib解压字段
int nSegFlag; // 1表示存在需要bese64以及zlib解压字段联动MemoryBlock
void clear()
{
nSegmentCount = 0;
nBigPtsBlock = 0;
nBigPtsLen0 = 0;
sBigPts0 = "";
nSegFlag = 0;
}
};
struct GDBXMemoryBlock
{
int nLine; //行号
int nUncomLength; //未压缩数据长度
CString sDatName; //数据名称
int nNumber; //数据块编号
CString sData; //数据 需要bese64以及zlib解压字段
void clear()
{
nLine = 0;
nUncomLength = 0;
sDatName = "";
nNumber = 0;
sData = "";
}
};
//环形(两组多边形组成)
struct GDBXAnnulus
{
int nCount;
};
//边框矩形信息
struct GDBXRectInfo {
int nTypeId; // 类型IDTypeID="100" 1点 2线 3面 5圆 7比例尺 28边框 30image
int nShapeId; // 图形ID(对应线段修饰ID)ShapeID="100"
CString shapeName; // 图形名称ShapeName=""
int nShapeFeatureId; // 图形特征IDShapeFeatureID="2110003"
CString shapeFeatureName; // 图形特征名称
int nVisible = 0; // 是否可见Visible="1"
int nReadOnly; // 是否只读ReadOnly="0"
double dAngle; // 角度Angle="0.000000"
CRect8 boundingBox; // 边界框BoundingBox="-0.529167,0.000000,95.250000,95.514583"
int nCanMove; // 是否可移动CanMove="1"
int nIsLock; // 是否锁定IsLock="0"
void clear()
{
nTypeId = 0;
nShapeId = 0;
shapeName = "";
nShapeFeatureId = 0;
shapeFeatureName = "";
nVisible = 0;
nReadOnly = 0;
dAngle = 0;
boundingBox = CRect8(0, 0, 0, 0);
nCanMove = 0;
nIsLock = 0;
}
};
//符号及其绘制信息
struct GDBXCustomTool
{
int nVersion = 0; // 版本号Version="4000009"
//矩形信息
GDBXRectInfo rectInfo;
//Rectangle
double dRoundScale; // 圆形比例
//Ellipse
double dStartAngle; // 起始角度
double dEndAngle; // 结束角度
int nType; // 图形类型
//Polyline
int nIsClosed = 0; // 是否闭合
int nIsShowCtrlPt; // 是否显示控制点
int nIsReverse; // 是否反向
int nIsSmooth; // 是否平滑
double dTensile; // 拉伸系数
//Polygon
COLORREF nFeClrOfName; // 前景颜色
COLORREF nBkClrOfName; // 背景颜色
int nIsFillBk; // 是否填充背景
//IsoFault 断层线 (IsoLine)
double dZ; // Z 轴位置,通常表示深度或高度 等值线z值
int nShowLabel; // 是否显示标签1 表示显示0 表示不显示
int nLabelColor; // 标签颜色,通常是 ARGB 格式
int nLabelNumber; // 标签编号,用于标识标签 几个
int nDecimalPlaces; // 小数位数,-1 表示不限制
int nDrawType; // 绘制类型,具体含义可能根据需求定义
int nFault; // 是否为故障1 表示是故障0 表示不是
double dDirectWidth; // 直接宽度
double dDirectHeight; // 直接高度
double dDirectSite; // 直接位置,表示某个特定位置坐标
int nDirectUp; // 直接向上1 表示向上0 表示向下
int nFaultBegin; // 故障开始位置,具体含义视具体场景而定
int nFaultNum; // 故障数量,表示有多少个故障
double dFaultWidth; // 故障宽度,表示故障的宽度
int nFaultColor; // 故障颜色,通常是 ARGB 格式
int nFaultDirection; // 故障方向,具体含义根据业务需求确定
int nFaultStyle; // 故障样式,表示故障的具体样式
double dFaultLenScale; // 故障长度缩放因子,用于调整故障的长度
CString sFaultLineName; // 故障线名称
//Group
int nDrawBorder; // 是否绘制边框
int nLockChild; // 是否锁定子元素
//Shapes
int nCount; // 形状的数量
void clear()
{
nVersion =0;
rectInfo.clear();
dRoundScale =0;
dStartAngle =0;
dEndAngle =0;
nType =0;
nIsClosed =0;
nIsShowCtrlPt =0;
nIsReverse =0;
nIsSmooth =0;
dTensile =0;
nFeClrOfName =0;
nBkClrOfName =0;
nIsFillBk =0;
dZ =0;
nShowLabel =0;
nLabelColor =0;
nLabelNumber =0;
nDecimalPlaces =0;
nDrawType =0;
nFault =0;
dDirectWidth =0;
dDirectHeight =0;
dDirectSite =0;
nDirectUp =0;
nFaultBegin =0;
nFaultNum =0;
dFaultWidth =0;
nFaultColor =0;
nFaultDirection =0;
nFaultStyle =0;
dFaultLenScale =0;
sFaultLineName ="";
nDrawBorder =0;
nLockChild =0;
nCount =0;
}
};
//修饰信息
struct GDBXFillInfo
{
double dPenWidth; // 笔宽
COLORREF penColor; // 笔颜色
int nPenDashStyle; // 画笔样式(可能是虚线、实线等样式)
int nPenStyleID; // 笔样式ID
CString penStyleName; // 笔样式名称
int nBDefaultColor; // 是否使用默认颜色0为否1为是
int nType; // 填充类型 (0 不填充, 1纯色填充 2渐变填充 3图片填充 4纹理填充5符号填充 6线性填充)
COLORREF nClrBeg; // 起始颜色
COLORREF nClrEnd; // 结束颜色
int nBlend; // 混合模式
double dStyle; // 填充样式
CRect8 rc; // 矩形区域
CSize8 sz; // 尺寸
int nSymBk; // 背景符号
COLORREF nSymFillBk; // 填充背景色
int nPointType; // 点类型 0平铺单色、1平铺彩色、2平铺设计....
double dImgRotate; // 图片旋转角度
double dx; // X坐标
double dy; // Y坐标
CString nImgFile; // 图片文件标识
void clear()
{
dPenWidth = 0;
penColor = 0;
nPenDashStyle = 0;
nPenStyleID = 0;
penStyleName = "";
nBDefaultColor = FALSE;
nType = 0;
nClrBeg = 0;
nClrEnd = 0;
nBlend = 0;
dStyle = 0;
rc = CRect8(0, 0, 0, 0);
sz = CSize8(0, 0);
nSymBk = 0;
nSymFillBk = 0;
nPointType = 0;
dImgRotate = 0;
dx = 0;
dy = 0;
nImgFile = "";
}
};
// 字体信息结构体
struct GDBXFontInfo
{
double tSX; // 文字 X 轴缩放因子
double tSY; // 文字 Y 轴缩放因子
double tfWidth; // 文字宽度比例
double tfHeight; // 文字高度比例
double tfColSpace; // 文字列间距
double tfRowSpace; // 文字行间距
COLORREF tFeColor; // 前景色,通常为 ARGB 或 RGBA 颜色值
COLORREF tBkColor; // 背景色,通常为 ARGB 或 RGBA 颜色值
int nHeight; // 字体高度,负值表示向上,正值表示向下
int nWidth; // 字符宽度0 表示默认宽度
int nEscapement; // 字形倾斜角度(通常用于斜体),以千分之一度为单位
int nOrientation; // 字形方向,通常为 0
int nWeight; // 字重,通常取值为 400常规700加粗
int isItalic; // 是否斜体0 表示否1 表示是
int isUnderline; // 是否下划线0 表示否1 表示是
int isStrikeOut; // 是否删除线0 表示否1 表示是
int nCharSet; // 字符集1 表示 ANSI 字符集2 表示西欧字符集,等等
int nOutPrecision; // 输出精度,影响字体显示的精度
int nClipPrecision; // 剪裁精度,决定如何处理字体的显示
int nQuality; // 字体质量,通常为 0 表示标准质量1 表示高质量
int nPitchAndFamily; // 字体的音调和家族(常用于选择等宽字体或其他特性)
// 新增的字体属性
int tAlign; // 文字对齐方式0 表示左对齐1 表示居中2 表示右对齐等
int tItalic; // 文字斜体标志0 表示否1 表示是
int tFormat; // 文字格式,具体含义根据应用定义
int tSpecial; // 特殊文字标志,具体含义根据应用定义
int tSClr; // 文字前景色,通常为颜色的 RGB 值
int tDeviceSize; // 设备尺寸,具体含义根据应用定义
int tBkFill; // 背景填充标志0 表示无填充1 表示填充
CString faceName; // 字体名称,如 "新宋体"
void clear()
{
nHeight = 0;
nWidth = 0;
nEscapement = 0;
nOrientation = 0;
nWeight = 0;
isItalic = 0;
isUnderline = 0;
isStrikeOut = 0;
nCharSet = 0;
nOutPrecision = 0;
nClipPrecision = 0;
nQuality = 0;
nPitchAndFamily = 0;
// 新增的字体属性
tAlign = 0;
tItalic = 0;
tFormat = 0;
tSpecial = 0;
tSClr = 0;
tDeviceSize = 0;
tBkFill = 0;
tSX = 0.0;
tSY = 0.0;
tfWidth = 0.0;
tfHeight = 0.0;
tfColSpace = 0.0;
tfRowSpace = 0.0;
tFeColor = RGB(0, 0, 0); // 默认颜色为黑色
tBkColor = RGB(255, 255, 255); // 默认背景色为白色
faceName = _T("");
}
};
struct GDBXLayers
{
int nActiveLayer; //活跃的图层数量
int nLayersCount; //总图层级数量
};
struct GDBXLayerInfo
{
//Layer
int nIndex; //当前图层顺序
int nVisble; //当前图层显示属性
int nSelectable; //图层是否可选择0表示不可选择1表示可选择()
int nNextRecNO; //下一个记录号码
//LayerInfo
CString sLayerName; // 图层名称
CString sFeatureName; // 特征名称 (如果为空则无特征名)
long lFeatureID; // 特征ID
int nVersion; // 版本号
CString sClass; // 类别 (如果为空则无类别)
CString sReMark; // 备注
CString sCreateDate; // 创建日期,格式为 YYYYMMDD,HH:MM:SS
CString sCustomInfo; // 自定义信息 (如果为空则无)
CRect8 rWorkAreaRange; // 工作范围
int nTypeID; // 类型ID
CString sCiteSrc; // 引用来源 (如果为空则无)
int nLevel; // 图层的层级,数字表示层级
double dMinSc; // 最小比例尺 (-1表示没有限制)
double dMaxSc; // 最大比例尺 (-1表示没有限制)
int nbSaveShape; // 是否保存形状2 表示保存
CString sMarkLabel; // 标注标签 (如果为空则无)
CString sParameterXml; // 参数 XML 配置 (如果为空则无)
CString sReserve; // 保留字段 (如果为空则无)
CString sBackup; // 备份字段 (如果为空则无)
//DefShapes
int nDefShapesCount;// 定义的形状数量
//Shapes
int nShapesCount; // 图层中实际的形状数量
void clear()
{
nIndex = 0;
nVisble = 0;
nSelectable = 0;
nNextRecNO = 0;
sLayerName = "";
sFeatureName = "";
lFeatureID = 0;
nVersion = 0;
sClass = "";
sReMark = "";
sCreateDate = "";
sCustomInfo = "";
rWorkAreaRange = CRect8(0,0,0,0);
nTypeID = 0;
sCiteSrc = "";
nLevel = 0;
dMinSc = 0;
dMaxSc = 0;
nbSaveShape = 0;
sMarkLabel = "";
sParameterXml = "";
sReserve = "";
sBackup = "";
nDefShapesCount = 0;
nShapesCount = 0;
}
};
struct GDBXImageInfo
{
GDBXRectInfo rectInfo;
int nIsotropic; //是否等比例缩放,"0"表示不是等比例缩放,"1"表示是等比例缩放
int nIfGif; //是否为 GIF 格式,"0"表示不是 GIF 格式,"1"表示是 GIF 格式
CString sName; //图片名称
CString sPath; //图片完整路径(没有带后缀)
void clear()
{
rectInfo.clear();
nIsotropic = 0;
nIfGif = 0;
sName = "";
sPath = "";
}
};
//图框?
struct GDBXInserMapInfo
{
GDBXRectInfo rectInfo; //矩形信息
CString sFileName; //图框GDBX文件名称
void clear()
{
rectInfo.clear();
sFileName = "";
}
};
struct GDBXLLGridInfo
{
//矩形信息
GDBXRectInfo rectInfo;
// 网格间距
double dXSpace; // X轴方向的网格间距单位
double dYSpace; // Y轴方向的网格间距单位
// 指定位置
double dXSpecified; // X方向的指定位置
double dYSpecified; // Y方向的指定位置
// 标签设置
int nLineLab; // 行标签,表示标签的类型或数量
int nXMinorLabDe; // X轴方向的小数位数用于精度显示
int nYMinorLabDec; // Y轴方向的小数位数用于精度显示
int nAddZero; // 是否添加零1表示添加0表示不添加
int LabUnitType; //标签的单位类型,"1"可能表示某种特定的单位(如米、度等)。
// 边框设置
int nBorderType; // 边框类型,可能有不同的样式
double dBorderDist12; // 边框12点的距离
double dBorderDist23; // 边框23点的距离
// 框架宽度和颜色
double dInFrameWid; // 内框宽度
COLORREF nClrInFrame; // 内框颜色(通过整数表示颜色值)
double dMidFrameWid; // 中框宽度
COLORREF nClrMidFrame; // 中框颜色
double dOutFrameWid; // 外框宽度
COLORREF nClrOutFrame; // 外框颜色
// 网格线宽度和颜色
double dGridLineWid; // 网格线宽度
COLORREF nClrGrid; // 网格线颜色(通过整数表示颜色值)
void clear()
{
//矩形信息
rectInfo.clear();
dXSpace = 0;
dYSpace = 0;
dXSpecified = 0;
dYSpecified = 0;
nLineLab = 0;
nXMinorLabDe = 0;
nYMinorLabDec = 0;
nAddZero = 0;
nBorderType = 0;
dBorderDist12 = 0;
dBorderDist23 = 0;
dInFrameWid = 0;
nClrInFrame = 0;
dMidFrameWid = 0;
nClrMidFrame = 0;
dOutFrameWid = 0;
nClrOutFrame = 0;
dGridLineWid = 0;
nClrGrid = 0;
}
};
struct GDBXNormalGridInfo
{
GDBXRectInfo rectInfo;
CRect8 rUserRect; //用户区域
CRect8 rMarkRect; //标记区域
// 网格间距
double dHorizontalSpace; //水平间距
double dVerticalSpace; //垂直间距
double dEnhGridLineWid; //增强网格线宽
double dclrEnhGrid; //增强网格颜色
int nDrawGridFlag; //绘制网格标志
int nInnerHorizontalSpace; //内部水平间距
int nXLabFlag; //X轴标签标志
int nXLabDecimal; //X轴小数位数
int nInnerVerticalSpace; //内部垂直间距
int nYLabFlag; //Y轴标签标志
int nYLabDecimal; //Y轴小数位数
double dXSpecified; //X指定值
double dYSpecified; //Y指定值
int nflag; //标志位
int nXMinorLabDe; //X次要标签小数位
int nYMinorLabDec; //Y次要标签小数位
int nLabUnitType; //标签单位类型
int nBorderType; //边框类型
double dBorderDist12; // 边框12点的距离
double dBorderDist23; // 边框23点的距离
// 框架宽度和颜色
double dInFrameWid; // 内框宽度
COLORREF nClrInFrame; // 内框颜色(通过整数表示颜色值)
double dMidFrameWid; // 中框宽度
COLORREF nClrMidFrame; // 中框颜色
double dOutFrameWid; // 外框宽度
COLORREF nClrOutFrame; // 外框颜色
// 网格线宽度和颜色
double dGridLineWid; // 网格线宽度
COLORREF nClrGrid; // 网格线颜色(通过整数表示颜色值)
void clear()
{
rectInfo.clear();
rUserRect = CRect8(0, 0, 0, 0);
rMarkRect = CRect8(0, 0, 0, 0);
dHorizontalSpace = 0;
dVerticalSpace = 0;
dEnhGridLineWid = 0;
dclrEnhGrid = 0;
nDrawGridFlag = 0;
nInnerHorizontalSpace = 0;
nXLabFlag = 0;
nXLabDecimal = 0;
nInnerVerticalSpace = 0;
nYLabFlag = 0;
nYLabDecimal = 0;
dXSpecified = 0;
dYSpecified = 0;
nflag = 0;
nXMinorLabDe = 0;
nYMinorLabDec = 0;
nLabUnitType = 0;
nBorderType = 0;
dBorderDist12 = 0;
dBorderDist23 = 0;
dInFrameWid = 0;
nClrInFrame = 0;
dMidFrameWid = 0;
nClrMidFrame = 0;
dOutFrameWid = 0;
nClrOutFrame = 0;
dGridLineWid = 0;
nClrGrid = 0;
}
};
// 锚点
struct GDBXAnchor
{
double dAnchorX; // 锚点 X 坐标
double dAnchorY; // 锚点 Y 坐标
double dAnchorZ; // 锚点 Z 坐标
double dWidth; // 宽度
double dHeight; // 高度
long nIndex; // 索引
COLORREF nClrBeg; // 开始颜色
COLORREF nClrEnd; // 结束颜色
COLORREF nClrFill; // 填充颜色
int nPointType; // 点类型
int nTransparent; // 是否透明 (1: true, 0: false)
int nFillTransparent; // 填充是否透明 (1: true, 0: false)
int nAnchorType; // 锚点类型
double dPenScale; // 笔刷比例
CString symbolName; // 符号名称
GDBXAnchor() {};
~GDBXAnchor() {};
void clear()
{
dAnchorX = 0;
dAnchorY = 0;
dAnchorZ = 0;
dWidth = 0;
dHeight = 0;
nIndex = 0;
nClrBeg = 0;
nClrEnd = 0;
nClrFill = 0;
nPointType = 0;
nTransparent = 0;
nFillTransparent = 0;
nAnchorType = 0;
dPenScale = 0;
symbolName = "";
}
GDBXAnchor& operator=(const GDBXAnchor& other) {
if (this != &other) {
dAnchorX = other.dAnchorX;
dAnchorY = other.dAnchorY;
dAnchorZ = other.dAnchorZ;
dWidth = other.dWidth;
dHeight = other.dHeight;
nIndex = other.nIndex;
nClrBeg = other.nClrBeg;
nClrEnd = other.nClrEnd;
nClrFill = other.nClrFill;
nPointType = other.nPointType;
nTransparent = other.nTransparent;
nFillTransparent = other.nFillTransparent;
nAnchorType = other.nAnchorType;
dPenScale = other.dPenScale;
symbolName = other.symbolName;
}
return *this;
}
};
//字体属性 //主要与次要字体属性XMajorFontXMinorFontYMajorFontYMinorFont
struct GDBXGMFONT
{
double dHeight; // 字体高度
double dWidth; // 字体宽度
double dEscapement; // 字体行进度
double dOrientation; // 字体方向
int nWeight; // 字体粗细
int nItalic; // 是否斜体 (1: true, 0: false)
int nUnderline; // 是否下划线 (1: true, 0: false)
int nStrikeOut; // 是否删除线 (1: true, 0: false)
int nCharSet; // 字符集
int nOutPrecision; // 输出精度
int nClipPrecision; // 裁剪精度
int nQuality; // 字体质量
int nPitchAndFamily;// 字体家庭
CString faceName; // 字体名称
int nTAlign; // 对齐方式
int nTItalic; // 是否斜体
int nTFormat; // 字体格式 (横向 竖向1
int nTSpecial; // 特殊字体设置
COLORREF nTSClr; // 字体颜色
double dTSX; // 字体 X 方向缩放因子
double dTSY; // 字体 Y 方向缩放因子
double dTDeviceSize; // 设备大小 //2是区域拉伸文字标题需要
double dTfWidth; // 字体宽度
double dTfHeight; // 字体高度
double dTfColSpace; // 字体列间距
double dTfRowSpace; // 字体行间距
COLORREF nTFeColor; // 前景色
COLORREF nTBkColor; // 背景色
int nTBkFill; // 是否填充背景 (1: true, 0: false)
void clear()
{
dHeight = 0;
dWidth = 0;
dEscapement = 0;
dOrientation = 0;
nWeight = 0;
nItalic = 0;
nUnderline = 0;
nStrikeOut = 0;
nCharSet = 0;
nOutPrecision = 0;
nClipPrecision = 0;
nQuality = 0;
nPitchAndFamily = 0;
faceName = "";
nTAlign = 0;
nTItalic = 0;
nTFormat = 0;
nTSpecial = 0;
nTSClr = 0;
dTSX = 0;
dTSY = 0;
dTDeviceSize = 0;
dTfWidth = 0;
dTfHeight = 0;
dTfColSpace = 0;
dTfRowSpace = 0;
nTFeColor = 0;
nTBkColor = 0;
nTBkFill = 0;
}
};
struct GDBXTextInfo
{
//矩形信息
GDBXRectInfo rectInfo;
CString text; // 文本内容
GDBXGMFONT gmFontInfo; // 字体部分
void clear()
{
//矩形信息
rectInfo.clear();
text = "";
gmFontInfo.clear();
}
};
// 标签偏移量
struct GDBXLableOffset
{
int nLableOffsetCount; // 标签数量
vector<CSize8> vPts;
void clear()
{
nLableOffsetCount = 0;
vPts.clear();
}
};
//
struct GDBXScaleInfo
{
//矩形信息
GDBXRectInfo rectInfo;
double dAxisWid; // 坐标轴宽度
double dScale; // 比例
CString sTitle; // 标题
double dTitleOff; // 标题偏移
double dGradLen; // 刻度长度
double dAxisStart; // 坐标轴起始位置
double dAxisEnd; // 坐标轴结束位置
double dInterval; // 刻度间隔
double dLabelOff; // 标签偏移
int nUnitType; // 单位类型
CString sUnitName; // 单位名称
double dUnitLen; // 单位长度
int nLabPrecision; // 标签精度
CSize8 basePoint; // 基点 (2 个浮点数)
CRect8 titleBox; // 标题框 (4 个浮点数)
CRect8 labelBox; // 标签框 (4 个浮点数)
CRect8 axisBox; // 坐标轴框 (4 个浮点数)
CRect8 gradBox; // 刻度框 (4 个浮点数)
double dUnitTxtWidth; // 单位文本宽度
double dSubGradLen; // 次刻度长度
double dSubInterval; // 次刻度间隔
COLORREF nTitleColor; // 标题颜色
COLORREF nLabelColor; // 标签颜色
double dSubGradPenWidth; // 次刻度线宽度
void clear()
{
//矩形信息
rectInfo.clear();
dAxisWid = 0;
dScale = 0;
sTitle = "";
dTitleOff = 0;
dGradLen = 0;
dAxisStart = 0;
dAxisEnd = 0;
dInterval = 0;
dLabelOff = 0;
nUnitType = 0;
sUnitName = "";
dUnitLen = 0;
nLabPrecision = 0;
basePoint = CSize8(0, 0);
titleBox = CRect8(0, 0, 0, 0);
labelBox = CRect8(0, 0, 0, 0);
axisBox = CRect8(0, 0, 0, 0);
gradBox = CRect8(0, 0, 0, 0);
dUnitTxtWidth = 0;
dSubGradLen = 0;
dSubInterval = 0;
nTitleColor = 0;
nLabelColor = 0;
dSubGradPenWidth = 0;
}
};
//符号井
struct GDBXWellInfo
{
//矩形信息
GDBXRectInfo rectInfo;
int nTopBkTransparent; // 顶部背景透明
int nBottomBkTransparent; // 底部背景透明
int nTextBkTransparent; // 文字背景透明
int nTopPointType; // 顶部符号颜色模式 3色模式单色0、彩色1、设计2
int nBottomPointType; // 底部符号颜色模式 3色模式单色0、彩色1、设计2
int nLinkLineType; // 连接线类型
CString strTopSymbolId; // 顶部符号名称
CString strBottomSymbol; // 底部符号名称
int nTopSymbolId; // 顶部符号ID
int nBottomSymbolId; // 底部符号ID
int nTopSymbolFrame; // 顶部符号框架
int nBottomSymbolFrame; // 底部符号框架
COLORREF nTopClr; // 顶部颜色
COLORREF nBottomClr; // 底部颜色
COLORREF nTextClr; // 文字颜色
COLORREF nTopBkClr; // 顶部背景颜色
COLORREF nBottomBkClr; // 底部背景颜色
COLORREF nTextBkClr; // 文字背景颜色
COLORREF nTopFillClr; // 顶部填充颜色
COLORREF nBottomFillClr; // 底部填充颜色
double dTopWidth; // 顶部宽度
double dTopHeight; // 顶部高度
double dBottomWidth; // 底部宽度
double dBottomHeight; // 底部高度
double dTopX; // 顶部X坐标
double dTopY; // 顶部Y坐标
double dBottomX; // 底部X坐标
double dBottomY; // 底部Y坐标
double dTopPenScale; // 顶部画笔比例
double dBottomPenScale; // 底部画笔比例
double doffsetX; // 偏移量X
double doffsetY; // 偏移量Y
double dTextWidth; // 文字宽度
double dTextHeight; // 文字高度
void clear()
{
rectInfo.clear();
nTopBkTransparent = 0;
nBottomBkTransparent = 0;
nTextBkTransparent = 0;
nTopPointType = 0;
nBottomPointType = 0;
nLinkLineType = 0;
strTopSymbolId = "";
strBottomSymbol = "";
nTopSymbolId = 0;
nBottomSymbolId = 0;
nTopSymbolFrame = 0;
nBottomSymbolFrame = 0;
nTopClr = 0;
nBottomClr = 0;
nTextClr = 0;
nTopBkClr = 0;
nBottomBkClr = 0;
nTextBkClr = 0;
nTopFillClr = 0;
nBottomFillClr = 0;
dTopWidth = 0;
dTopHeight = 0;
dBottomWidth = 0;
dBottomHeight = 0;
dTopX = 0;
dTopY = 0;
dBottomX = 0;
dBottomY = 0;
dTopPenScale = 0;
dBottomPenScale = 0;
doffsetX = 0;
doffsetY = 0;
dTextWidth = 0;
dTextHeight = 0;
}
};
//油气水柱
struct GDBXOilWaterInfo
{
COLORREF gasColor; //气相颜色
COLORREF oilColor; //油相颜色
COLORREF waterColor; //水相颜色
GDBXRectInfo rectInfo; //矩形信息
void clear()
{
gasColor = 0;
oilColor = 0;
waterColor = 0;
rectInfo.clear();
}
};
//油气水柱组
struct GDBXOilWaterGroupInfo
{
int nDrawEdge; // 是否绘制油水群体的边缘 (1: 是, 0: 否)
CString sGasOutput; // 气体输出量
CString sOilOutput; // 石油输出量
CString sWaterOutput; // 水输出量
double dPillarHig; // 柱高
double dCutGas; // 切割气体比例
double dCutOil; // 切割石油比例
double dCutWater; // 切割水比例
int nDecimalPlaces; // 小数位数
CString sRelationWellName; // 关联井名称
CRect8 rectPillar; // 柱体矩形区域 (left, top, right, bottom)
CRect8 rectText; // 文字矩形区域 (left, top, right, bottom)
void clear()
{
nDrawEdge = 0;
sGasOutput = "";
sOilOutput = "";
sWaterOutput = "";
dPillarHig = 0.0;
dCutGas = 0.0;
dCutOil = 0.0;
dCutWater = 0.0;
nDecimalPlaces = 0;
sRelationWellName = "";
rectPillar = CRect8(0, 0, 0, 0);
rectText = CRect8(0, 0, 0, 0);
}
};
#endif //GDBX_DEFINE_H