📄 tabfeaturebrush.cpp
字号:
// tabfeaturebrush.cpp: implementation of the TABFeatureBrush class.////////////////////////////////////////////////////////////////////////#include "tabfeaturebrush.h"#include "ugk_string.h"/********************************************************************** * TABFeatureBrush::TABFeatureBrush() **********************************************************************/TABFeatureBrush::TABFeatureBrush(){ static const TABBrushDef csDefaultBrush = MITAB_BRUSH_DEFAULT; m_nBrushDefIndex=-1; m_sBrushDef = csDefaultBrush;}/********************************************************************** * TABFeatureBrush::~TABFeatureBrush() **********************************************************************/TABFeatureBrush::~TABFeatureBrush(){}/********************************************************************** * ITABFeatureBrush::GetBrushStyleString() * * Return a Brush() string. All representations info for the Brush are here. **********************************************************************/const char *TABFeatureBrush::GetBrushStyleString(){ const char *pszStyle = NULL; int nUGKStyle = 0; char szPattern[20]; szPattern[0] = '\0'; if (m_sBrushDef.nFillPattern == 1) nUGKStyle = 1; else if (m_sBrushDef.nFillPattern == 3) nUGKStyle = 2; else if (m_sBrushDef.nFillPattern == 4) nUGKStyle = 3; else if (m_sBrushDef.nFillPattern == 5) nUGKStyle = 5; else if (m_sBrushDef.nFillPattern == 6) nUGKStyle = 4; else if (m_sBrushDef.nFillPattern == 7) nUGKStyle = 6; else if (m_sBrushDef.nFillPattern == 8) nUGKStyle = 7; if (GetBrushTransparent()) { /* Omit BG Color for transparent brushes */ pszStyle =UGKSPrintf("BRUSH(fc:#%6.6x,id:\"mapinfo-brush-%d.ogr-brush-%d\")", m_sBrushDef.rgbFGColor, m_sBrushDef.nFillPattern,nUGKStyle); } else { pszStyle =UGKSPrintf("BRUSH(fc:#%6.6x,bc:#%6.6x,id:\"mapinfo-brush-%d.ogr-brush-%d\")", m_sBrushDef.rgbFGColor, m_sBrushDef.rgbBGColor, m_sBrushDef.nFillPattern,nUGKStyle); } return pszStyle; } /********************************************************************** * ITABFeatureBrush::DumpBrushDef() * * Dump Brush definition information. **********************************************************************/void TABFeatureBrush::DumpBrushDef(FILE *fpOut /*=NULL*/){ if (fpOut == NULL) fpOut = stdout; fprintf(fpOut, " m_nBrushDefIndex = %d\n", m_nBrushDefIndex); fprintf(fpOut, " m_sBrushDef.nRefCount = %d\n", m_sBrushDef.nRefCount); fprintf(fpOut, " m_sBrushDef.nFillPattern = %d\n", (int)m_sBrushDef.nFillPattern); fprintf(fpOut, " m_sBrushDef.bTransparentFill = %d\n", (int)m_sBrushDef.bTransparentFill); fprintf(fpOut, " m_sBrushDef.rgbFGColor = 0x%6.6x (%d)\n", m_sBrushDef.rgbFGColor, m_sBrushDef.rgbFGColor); fprintf(fpOut, " m_sBrushDef.rgbBGColor = 0x%6.6x (%d)\n", m_sBrushDef.rgbBGColor, m_sBrushDef.rgbBGColor); fflush(fpOut);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -