📄 tabmapobjline.cpp
字号:
// tabmapobjline.cpp: implementation of the TABMAPObjLine class.////////////////////////////////////////////////////////////////////////#include "tabmapobjline.h"#include "ugk_errhandle.h"/********************************************************************** * TABMAPObjLine::ReadObj() * * Read Object information starting after the object id which should * have been read by TABMAPObjHdr::ReadNextObj() already. * This function should be called only by TABMAPObjHdr::ReadNextObj(). * * Returns 0 on success, -1 on error. **********************************************************************/int TABMAPObjLine::ReadObj(TABMAPObjectBlock *poObjBlock){ poObjBlock->ReadIntCoord(IsCompressedType(), m_nX1, m_nY1); poObjBlock->ReadIntCoord(IsCompressedType(), m_nX2, m_nY2); m_nPenId = poObjBlock->ReadByte(); // Pen index SetMBR(m_nX1, m_nY1, m_nX2, m_nY2); if (UGKGetLastErrorNo() != 0) return -1; return 0;}/********************************************************************** * TABMAPObjLine::WriteObj() * * Write Object information with the type+object id * * Returns 0 on success, -1 on error. **********************************************************************/int TABMAPObjLine::WriteObj(TABMAPObjectBlock *poObjBlock){ // Write object type and id TABMAPObjHdr::WriteObjTypeAndId(poObjBlock); poObjBlock->WriteIntCoord(m_nX1, m_nY1, IsCompressedType()); poObjBlock->WriteIntCoord(m_nX2, m_nY2, IsCompressedType()); poObjBlock->WriteByte(m_nPenId); // Pen index if (UGKGetLastErrorNo() != 0) return -1; return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -