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 INCLUDED_SHAPEINFO_H
11#define INCLUDED_SHAPEINFO_H
12
13#include <functional>
14#include <map>
15#include <memory>
16#include <vector>
17
18#include <boost/optional.hpp>
19
20#include "Arrow.h"
21#include "ColorReference.h"
22#include "Coordinate.h"
23#include "Dash.h"
24#include "Fill.h"
25#include "Line.h"
26#include "MSPUBTypes.h"
27#include "Margins.h"
28#include "PolygonUtils.h"
29#include "Shadow.h"
30#include "ShapeType.h"
31#include "TableInfo.h"
32#include "VerticalAlign.h"
33
34namespace libmspub
35{
36void noop(const CustomShape *);
38{
39 boost::optional<ShapeType> m_type;
40 boost::optional<ShapeType> m_cropType;
41 boost::optional<unsigned> m_imgIndex;
42 boost::optional<unsigned> m_borderImgIndex;
43 boost::optional<Coordinate> m_coordinates;
44 std::vector<Line> m_lines;
45 boost::optional<unsigned> m_pageSeqNum;
46 boost::optional<unsigned> m_textId;
47 std::map<unsigned, int> m_adjustValuesByIndex;
48 std::vector<int> m_adjustValues;
49 boost::optional<double> m_rotation;
50 boost::optional<std::pair<bool, bool> > m_flips;
51 boost::optional<Margins> m_margins;
52 boost::optional<BorderPosition> m_borderPosition; // Irrelevant except for rectangular shapes
53 std::shared_ptr<const Fill> m_fill;
54 boost::optional<DynamicCustomShape> m_customShape;
56 boost::optional<ColorReference> m_lineBackColor;
57 boost::optional<Dash> m_dash;
58 boost::optional<TableInfo> m_tableInfo;
59 boost::optional<unsigned> m_numColumns;
61 boost::optional<Arrow> m_beginArrow;
62 boost::optional<Arrow> m_endArrow;
63 boost::optional<VerticalAlign> m_verticalAlign;
64 boost::optional<ColorReference> m_pictureRecolor;
65 boost::optional<Shadow> m_shadow;
66 boost::optional<int> m_innerRotation;
67 std::vector<libmspub::Vertex> m_clipPath;
68 boost::optional<int> m_pictureBrightness;
69 boost::optional<int> m_pictureContrast;
81 std::shared_ptr<const CustomShape> getCustomShape() const
82 {
83 if (bool(m_customShape))
84 {
86 }
87 if (bool(m_cropType))
88 {
89 return std::shared_ptr<const CustomShape>(
91 std::function<void (const CustomShape *)>(noop));
92 }
93 return std::shared_ptr<const CustomShape>(
95 std::function<void (const CustomShape *)>(noop));
96 }
97};
98}
99#endif
100/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition Arrow.h:14
@ RECTANGLE
Definition ShapeType.h:19
void noop(const CustomShape *)
Definition MSPUBCollector.cpp:520
std::shared_ptr< const CustomShape > getFromDynamicCustomShape(const DynamicCustomShape &dcs)
Definition PolygonUtils.cpp:6381
const CustomShape * getCustomShape(ShapeType type)
Definition PolygonUtils.cpp:5245
Definition PolygonUtils.h:60
boost::optional< DynamicCustomShape > m_customShape
Definition ShapeInfo.h:54
std::shared_ptr< const CustomShape > getCustomShape() const
Definition ShapeInfo.h:81
boost::optional< unsigned > m_numColumns
Definition ShapeInfo.h:59
boost::optional< ColorReference > m_lineBackColor
Definition ShapeInfo.h:56
std::shared_ptr< const Fill > m_fill
Definition ShapeInfo.h:53
std::map< unsigned, int > m_adjustValuesByIndex
Definition ShapeInfo.h:47
std::vector< libmspub::Vertex > m_clipPath
Definition ShapeInfo.h:67
boost::optional< ColorReference > m_pictureRecolor
Definition ShapeInfo.h:64
boost::optional< TableInfo > m_tableInfo
Definition ShapeInfo.h:58
boost::optional< std::pair< bool, bool > > m_flips
Definition ShapeInfo.h:50
unsigned m_columnSpacing
Definition ShapeInfo.h:60
boost::optional< int > m_pictureBrightness
Definition ShapeInfo.h:68
std::vector< int > m_adjustValues
Definition ShapeInfo.h:48
boost::optional< double > m_rotation
Definition ShapeInfo.h:49
boost::optional< Arrow > m_endArrow
Definition ShapeInfo.h:62
boost::optional< unsigned > m_pageSeqNum
Definition ShapeInfo.h:45
boost::optional< unsigned > m_textId
Definition ShapeInfo.h:46
boost::optional< Dash > m_dash
Definition ShapeInfo.h:57
boost::optional< Arrow > m_beginArrow
Definition ShapeInfo.h:61
boost::optional< ShapeType > m_type
Definition ShapeInfo.h:39
boost::optional< Shadow > m_shadow
Definition ShapeInfo.h:65
boost::optional< int > m_innerRotation
Definition ShapeInfo.h:66
boost::optional< ShapeType > m_cropType
Definition ShapeInfo.h:40
boost::optional< int > m_pictureContrast
Definition ShapeInfo.h:69
boost::optional< unsigned > m_borderImgIndex
Definition ShapeInfo.h:42
boost::optional< Coordinate > m_coordinates
Definition ShapeInfo.h:43
boost::optional< unsigned > m_imgIndex
Definition ShapeInfo.h:41
bool m_stretchBorderArt
Definition ShapeInfo.h:55
ShapeInfo()
Definition ShapeInfo.h:70
boost::optional< VerticalAlign > m_verticalAlign
Definition ShapeInfo.h:63
std::vector< Line > m_lines
Definition ShapeInfo.h:44
boost::optional< BorderPosition > m_borderPosition
Definition ShapeInfo.h:52
boost::optional< Margins > m_margins
Definition ShapeInfo.h:51

Generated for libmspub by doxygen 1.14.0