Files
core/HwpFile/HwpDoc/Paragraph/CtrlShapeArc.cpp
2025-01-11 01:18:41 +03:00

48 lines
1.1 KiB
C++

#include "CtrlShapeArc.h"
namespace HWP
{
CCtrlShapeArc::CCtrlShapeArc()
{}
CCtrlShapeArc::CCtrlShapeArc(const HWP_STRING& sCtrlID)
: CCtrlGeneralShape(sCtrlID)
{}
CCtrlShapeArc::CCtrlShapeArc(const CCtrlGeneralShape& oShape)
: CCtrlGeneralShape(oShape)
{}
CCtrlShapeArc::CCtrlShapeArc(const HWP_STRING& sCtrlID, int nSize, CHWPStream& oBuffer, int nOff, int nVersion)
: CCtrlGeneralShape(sCtrlID, nSize, oBuffer, nOff, nVersion)
{}
EShapeType CCtrlShapeArc::GetShapeType() const
{
return EShapeType::Arc;
}
int CCtrlShapeArc::ParseElement(CCtrlShapeArc& oObj, int nSize, CHWPStream& oBuffer, int nOff, int nVersion)
{
oBuffer.SavePosition();
oObj.m_eType = GetArcType(oBuffer.ReadByte());
oBuffer.ReadInt(oObj.m_nCenterX);
oBuffer.ReadInt(oObj.m_nCenterY);
oBuffer.ReadInt(oObj.m_nAxixX1);
oBuffer.ReadInt(oObj.m_nAxixY1);
oBuffer.ReadInt(oObj.m_nAxixX2);
oBuffer.ReadInt(oObj.m_nAxixY2);
oBuffer.Skip(nSize - oBuffer.GetDistanceToLastPos(true));
return nSize;
}
int CCtrlShapeArc::ParseCtrl(CCtrlShapeArc& oObj, int nSize, CHWPStream& oBuffer, int nOff, int nVersion)
{
return CCtrlGeneralShape::ParseCtrl(oObj, nSize, oBuffer, nOff, nVersion);
}
}