ShapeInfo.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3  * This file is part of the libmspub project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  */
9 
10 #ifndef __SHAPEINFO_H__
11 #define __SHAPEINFO_H__
12 #include <boost/optional.hpp>
13 #include <boost/shared_ptr.hpp>
14 #include <map>
15 #include <vector>
16 #include <boost/function.hpp>
17 #include "ShapeType.h"
18 #include "Coordinate.h"
19 #include "Line.h"
20 #include "Margins.h"
21 #include "MSPUBTypes.h"
22 #include "Fill.h"
23 #include "PolygonUtils.h"
24 #include "Dash.h"
25 #include "TableInfo.h"
26 #include "Arrow.h"
27 #include "VerticalAlign.h"
28 #include "ColorReference.h"
29 #include "Shadow.h"
30 
31 namespace libmspub
32 {
33 void noop(const CustomShape *);
34 struct ShapeInfo
35 {
36  boost::optional<ShapeType> m_type;
37  boost::optional<ShapeType> m_cropType;
38  boost::optional<unsigned> m_imgIndex;
39  boost::optional<unsigned> m_borderImgIndex;
40  boost::optional<Coordinate> m_coordinates;
41  std::vector<Line> m_lines;
42  boost::optional<unsigned> m_pageSeqNum;
43  boost::optional<unsigned> m_textId;
44  std::map<unsigned, int> m_adjustValuesByIndex;
45  std::vector<int> m_adjustValues;
46  boost::optional<double> m_rotation;
47  boost::optional<std::pair<bool, bool> > m_flips;
48  boost::optional<Margins> m_margins;
49  boost::optional<BorderPosition> m_borderPosition; // Irrelevant except for rectangular shapes
50  boost::shared_ptr<const Fill> m_fill;
51  boost::optional<DynamicCustomShape> m_customShape;
53  boost::optional<ColorReference> m_lineBackColor;
54  boost::optional<Dash> m_dash;
55  boost::optional<TableInfo> m_tableInfo;
56  boost::optional<std::vector<unsigned> > m_tableCellTextEnds;
57  boost::optional<unsigned> m_numColumns;
58  unsigned m_columnSpacing;
59  boost::optional<Arrow> m_beginArrow;
60  boost::optional<Arrow> m_endArrow;
61  boost::optional<VerticalAlign> m_verticalAlign;
62  boost::optional<ColorReference> m_pictureRecolor;
63  boost::optional<Shadow> m_shadow;
64  boost::optional<int> m_innerRotation;
65  std::vector<libmspub::Vertex> m_clipPath;
66  boost::optional<int> m_pictureBrightness;
67  boost::optional<int> m_pictureContrast;
77  {
78  }
79  boost::shared_ptr<const CustomShape> getCustomShape() const
80  {
81  if (!!m_customShape)
82  {
84  }
85  if (!!m_cropType)
86  {
87  return boost::shared_ptr<const CustomShape>(
89  boost::function<void (const CustomShape *)>(noop));
90  }
91  return boost::shared_ptr<const CustomShape>(
93  boost::function<void (const CustomShape *)>(noop));
94  }
95 };
96 }
97 #endif
98 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */

Generated for libmspub by doxygen 1.8.4