FHCollector.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /*
00003  * This file is part of the libfreehand project.
00004  *
00005  * This Source Code Form is subject to the terms of the Mozilla Public
00006  * License, v. 2.0. If a copy of the MPL was not distributed with this
00007  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
00008  */
00009 
00010 #ifndef __FHCOLLECTOR_H__
00011 #define __FHCOLLECTOR_H__
00012 
00013 #include <map>
00014 #include "FHCollector.h"
00015 #include "FHTransform.h"
00016 #include "FHTypes.h"
00017 #include "FHPath.h"
00018 
00019 namespace libfreehand
00020 {
00021 
00022 class FHCollector
00023 {
00024 public:
00025   FHCollector(::libwpg::WPGPaintInterface *painter, const FHPageInfo &pageInfo);
00026   virtual ~FHCollector();
00027 
00028   // collector functions
00029   void collectUString(unsigned recordId, const std::vector<unsigned short> &ustr);
00030   void collectMName(unsigned recordId, const WPXString &name);
00031   void collectPath(unsigned recordId, unsigned short graphicStyle, unsigned short layer,
00032                    unsigned short xform, const FHPath &path, bool evenodd);
00033   void collectXform(unsigned recordId, double m11, double m21,
00034                     double m12, double m22, double m13, double m23);
00035 
00036   void collectOffsetX(double) {}
00037   void collectOffsetY(double) {}
00038   void collectPageWidth(double) {}
00039   void collectPageHeight(double) {}
00040 
00041 private:
00042   FHCollector(const FHCollector &);
00043   FHCollector &operator=(const FHCollector &);
00044 
00045   void _normalizePath(FHPath &path);
00046 
00047   libwpg::WPGPaintInterface *m_painter;
00048   const FHPageInfo &m_pageInfo;
00049   std::map<unsigned, FHTransform> m_transforms;
00050 };
00051 
00052 } // namespace libfreehand
00053 
00054 #endif /* __FHCOLLECTOR_H__ */
00055 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */