tabmapobjline.cpp
来自「linux下一款GIS程序源码」· C++ 代码 · 共 56 行
CPP
56 行
// 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 + =
减小字号Ctrl + -
显示快捷键?