Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef __VSDSTENCILS_H__
00032 #define __VSDSTENCILS_H__
00033
00034 #include <map>
00035 #include <vector>
00036 #include "VSDStyles.h"
00037 #include "VSDGeometryList.h"
00038 #include "VSDFieldList.h"
00039 #include "VSDTypes.h"
00040 #include "VSDParagraphList.h"
00041 #include "VSDCharacterList.h"
00042 #include "VSDShapeList.h"
00043
00044 namespace libvisio
00045 {
00046
00047 class VSDShape
00048 {
00049 public:
00050 VSDShape();
00051 VSDShape(const VSDShape &shape);
00052 ~VSDShape();
00053 VSDShape &operator=(const VSDShape &shape);
00054 void clear();
00055
00056 std::map<unsigned, VSDGeometryList> m_geometries;
00057 VSDShapeList m_shapeList;
00058 VSDFieldList m_fields;
00059 ForeignData *m_foreign;
00060 unsigned m_parent, m_masterPage, m_masterShape, m_shapeId;
00061 unsigned m_lineStyleId, m_fillStyleId, m_textStyleId;
00062 VSDOptionalLineStyle m_lineStyle;
00063 VSDOptionalFillStyle m_fillStyle;
00064 VSDOptionalTextBlockStyle m_textBlockStyle;
00065 VSDOptionalCharStyle m_charStyle;
00066 VSDCharacterList m_charList;
00067 VSDOptionalParaStyle m_paraStyle;
00068 VSDParagraphList m_paraList;
00069 WPXBinaryData m_text;
00070 std::map< unsigned, VSDName > m_names;
00071 TextFormat m_textFormat;
00072 std::map<unsigned, NURBSData> m_nurbsData;
00073 std::map<unsigned, PolylineData> m_polylineData;
00074 XForm m_xform;
00075 XForm *m_txtxform;
00076 };
00077
00078 class VSDStencil
00079 {
00080 public:
00081 VSDStencil();
00082 VSDStencil(const VSDStencil &stencil);
00083 ~VSDStencil();
00084 VSDStencil &operator=(const VSDStencil &stencil);
00085 void addStencilShape(unsigned id, const VSDShape &shape);
00086 void setFirstShape(unsigned id);
00087 const VSDShape *getStencilShape(unsigned id) const;
00088 std::map<unsigned, VSDShape> m_shapes;
00089 double m_shadowOffsetX;
00090 double m_shadowOffsetY;
00091 unsigned m_firstShapeId;
00092 };
00093
00094 class VSDStencils
00095 {
00096 public:
00097 VSDStencils();
00098 ~VSDStencils();
00099 void addStencil(unsigned idx, const VSDStencil &stencil);
00100 const VSDStencil *getStencil(unsigned idx) const;
00101 const VSDShape *getStencilShape(unsigned pageId, unsigned shapeId) const;
00102 unsigned count() const
00103 {
00104 return m_stencils.size();
00105 }
00106 void clear();
00107 private:
00108 std::map<unsigned, VSDStencil> m_stencils;
00109 };
00110
00111
00112 }
00113
00114 #endif // __VSDSTENCILS_H__
00115