diff options
author | panoskorovesis <panoskorovesis@outlook.com> | 2021-07-17 12:44:05 +0300 |
---|---|---|
committer | panoskorovesis <panoskorovesis@outlook.com> | 2021-07-17 12:44:05 +0300 |
commit | 0d7afd98e1838480f0f922e31f9ed4718209485b (patch) | |
tree | e41f836a95a5bb3ab04eab5af7ab60bd47588f29 | |
parent | 3aba4bdeb00f1c39d8131e8cee2634e5387a10f7 (diff) |
Add Handler for Point Write
The handler separates MetaPointAction::Read from metaact.hxx
Write implementation is now in SvmWriter.hxx
Change-Id: I805d092e0a932cf1e9d9d7d0c7fac7d9dd9cbd6e
-rw-r--r-- | include/vcl/filter/SvmWriter.hxx | 1 | ||||
-rw-r--r-- | vcl/source/filter/svm/SvmWriter.cxx | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/include/vcl/filter/SvmWriter.hxx b/include/vcl/filter/SvmWriter.hxx index 5b57d969b80b..3ba7553adff5 100644 --- a/include/vcl/filter/SvmWriter.hxx +++ b/include/vcl/filter/SvmWriter.hxx @@ -40,4 +40,5 @@ public: void MetaActionHandler(MetaAction* pAct, ImplMetaWriteData* pData); void ActionHandler(MetaActionType nType); void PixelHandler(MetaPixelAction* pAct); + void PointHandler(MetaPointAction* pAct); };
\ No newline at end of file diff --git a/vcl/source/filter/svm/SvmWriter.cxx b/vcl/source/filter/svm/SvmWriter.cxx index b4c373a16946..8733e493b254 100644 --- a/vcl/source/filter/svm/SvmWriter.cxx +++ b/vcl/source/filter/svm/SvmWriter.cxx @@ -85,6 +85,12 @@ void SvmWriter::MetaActionHandler(MetaAction* pAct, ImplMetaWriteData* pData) PixelHandler(pMetaAction); } break; + case MetaActionType::POINT: + { + auto pMetaAction = static_cast<MetaPointAction*>(pAct); + PointHandler(pMetaAction); + } + break; default: pAct->Write(mrStream, pData); } @@ -103,4 +109,12 @@ void SvmWriter::PixelHandler(MetaPixelAction* pAct) aSerializer.writePoint(pAct->GetPoint()); WriteColor(pAct->GetColor()); } + +void SvmWriter::PointHandler(MetaPointAction* pAct) +{ + ActionHandler(pAct->GetType()); + VersionCompatWrite aCompat(mrStream, 1); + TypeSerializer aSerializer(mrStream); + aSerializer.writePoint(pAct->GetPoint()); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |