QXPTypes.h Source File documentation

QXPTypes.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 libqxp 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 QXPTYPES_H_INCLUDED
11 #define QXPTYPES_H_INCLUDED
12
13 #include "libqxp_utils.h"
14 #include <boost/optional.hpp>
15 #include <boost/variant.hpp>
16
17 #include <memory>
18 #include <vector>
19 #include <utility>
20
21 namespace libqxp
22 {
23
24 struct Point
25 {
26 double x;
27 double y;
28
29 Point()
30 : x(0.0), y(0.0)
31 { }
32
33 Point(double xVal, double yVal)
34 : x(xVal), y(yVal)
35 { }
36
37 Point move(double dx, double dy) const;
38 Point rotateDeg(double rotationDeg, const Point &center) const;
39
40 double distance(const Point &p2) const;
41 };
42
43 bool operator==(const Point &lhs, const Point &rhs);
44 bool operator!=(const Point &lhs, const Point &rhs);
45
46 struct Rect
47 {
48 double top;
49 double right;
50 double bottom;
51 double left;
52
53 Rect();
54 Rect(double t, double r, double b, double l);
55
56 double width() const;
57 double height() const;
58
59 Point center() const;
60 Point topLeft() const;
61 Point topRight() const;
62 Point bottomRight() const;
63 Point bottomLeft() const;
64
65 Rect shrink(const double diff) const;
66 };
67
68 struct Color
69 {
70 uint8_t red;
71 uint8_t green;
72 uint8_t blue;
73
74 Color()
75 : red(0), green(0), blue(0)
76 { }
77
78 Color(uint8_t r, uint8_t g, uint8_t b)
79 : red(r), green(g), blue(b)
80 { }
81
82 librevenge::RVNGString toString() const;
83
84 Color applyShade(double shade) const;
85 };
86
87 enum class GradientType
88 {
89 LINEAR,
90 MIDLINEAR,
91 RECTANGULAR,
92 DIAMOND,
93 CIRCULAR,
94 FULLCIRCULAR
95 };
96
97 struct Gradient
98 {
99 GradientType type;
100 Color color1;
101 Color color2;
102 double angle;
103
104 Gradient()
105 : type(), color1(), color2(), angle(0.0)
106 { }
107 };
108
109 typedef boost::variant<Color, Gradient> Fill;
110
111 enum class LineCapType
112 {
113 BUTT,
114 ROUND,
115 RECT,
116 STRETCH
117 };
118
119 enum class LineJoinType
120 {
121 MITER,
122 ROUND,
123 BEVEL
124 };
125
126 struct LineStyle
127 {
128 std::vector<double> segmentLengths;
129 bool isStripe;
130 bool isProportional;
131 double patternLength;
132 LineCapType endcapType;
133 LineJoinType joinType;
134
135 LineStyle()
136 : segmentLengths(), isStripe(false), isProportional(true), patternLength(6.0), endcapType(LineCapType::BUTT), joinType(LineJoinType::MITER)
137 { }
138
139 LineStyle(std::vector<double> segments, bool proportional, double pattern, LineCapType endcap, LineJoinType join)
140 : segmentLengths(std::move(segments)), isStripe(false), isProportional(proportional), patternLength(pattern), endcapType(endcap), joinType(join)
141 { }
142 };
143
144 struct CharFormat
145 {
146 librevenge::RVNGString fontName;
147 double fontSize;
148 double baselineShift;
149 Color color;
150 bool bold;
151 bool italic;
152 bool underline;
153 bool outline;
154 bool shadow;
155 bool superscript;
156 bool subscript;
157 bool superior;
158 bool strike;
159 bool allCaps;
160 bool smallCaps;
161 bool wordUnderline;
162
163 bool isControlChars;
164
165 CharFormat()
166 : fontName("Arial"), fontSize(12.0), baselineShift(0.0), color(0, 0, 0),
167 bold(false), italic(false), underline(false), outline(false), shadow(false), superscript(false), subscript(false), superior(false),
168 strike(false), allCaps(false), smallCaps(false), wordUnderline(false),
169 isControlChars(false)
170 { }
171 };
172
173 struct HJ
174 {
175 HJ()
176 : hyphenate(true)
177 , minBefore(3)
178 , minAfter(2)
179 , maxInRow(0)
180 , singleWordJustify(true)
181 {
182 }
183
184 bool hyphenate;
185 unsigned minBefore;
186 unsigned minAfter;
187 unsigned maxInRow;
188 bool singleWordJustify;
189 };
190
191 enum class HorizontalAlignment
192 {
193 LEFT,
194 CENTER,
195 RIGHT,
196 JUSTIFIED,
197 FORCED
198 };
199
200 enum class VerticalAlignment
201 {
202 TOP,
203 CENTER,
204 BOTTOM,
205 JUSTIFIED
206 };
207
208 enum class TabStopType
209 {
210 LEFT,
211 CENTER,
212 RIGHT,
213 ALIGN
214 };
215
216 struct TabStop
217 {
218 TabStopType type;
219 double position;
220 librevenge::RVNGString fillChar;
221 librevenge::RVNGString alignChar;
222
223 bool isDefined() const
224 {
225 return position >= 0;
226 }
227
228 TabStop()
229 : type(TabStopType::LEFT), position(0.0), fillChar(), alignChar()
230 { }
231 };
232
233 struct ParagraphRule
234 {
235 double width;
236 Color color;
237 const LineStyle *lineStyle;
238 double leftMargin;
239 double rightMargin;
240 double offset;
241
242 ParagraphRule()
243 : width(1.0), color(0, 0, 0), lineStyle(nullptr), leftMargin(0), rightMargin(0), offset(0)
244 { }
245 };
246
247 struct ParagraphFormat
248 {
249 HorizontalAlignment alignment;
250 Rect margin;
251 double firstLineIndent;
252 double leading;
253 bool incrementalLeading;
254 std::shared_ptr<ParagraphRule> ruleAbove;
255 std::shared_ptr<ParagraphRule> ruleBelow;
256 std::vector<TabStop> tabStops;
257 std::shared_ptr<HJ> hj;
258
259 ParagraphFormat()
260 : alignment(HorizontalAlignment::LEFT), margin(), firstLineIndent(0), leading(0), incrementalLeading(false),
261 ruleAbove(nullptr), ruleBelow(nullptr), tabStops(), hj(nullptr)
262 { }
263 };
264
265 enum class ContentType
266 {
267 UNKNOWN,
268 OBJECTS, // group
269 NONE,
270 TEXT,
271 PICTURE
272 };
273
274 struct TextSpec
275 {
276 const unsigned startIndex;
277 const unsigned length;
278
279 unsigned endIndex() const
280 {
281 return startIndex + length - 1;
282 }
283
284 unsigned afterEndIndex() const
285 {
286 return startIndex + length;
287 }
288
289 bool overlaps(const TextSpec &other) const;
290
291 protected:
292 TextSpec(unsigned start, unsigned len)
293 : startIndex(start), length(len)
294 { }
295 };
296
297 struct CharFormatSpec : public TextSpec
298 {
299 std::shared_ptr<CharFormat> format;
300
301 CharFormatSpec(const std::shared_ptr<CharFormat> &f, unsigned start, unsigned len)
302 : TextSpec(start, len), format(f)
303 { }
304 };
305
306 struct ParagraphSpec : public TextSpec
307 {
308 std::shared_ptr<ParagraphFormat> format;
309
310 ParagraphSpec(const std::shared_ptr<ParagraphFormat> &f, unsigned start, unsigned len)
311 : TextSpec(start, len), format(f)
312 { }
313 };
314
315 struct Text
316 {
317 std::string text;
318 const char *encoding;
319 std::vector<ParagraphSpec> paragraphs;
320 std::vector<CharFormatSpec> charFormats;
321
322 double maxFontSize() const;
323 double maxFontSize(const ParagraphSpec &paragraph) const;
324
325 Text()
326 : text(), encoding("cp1252"), paragraphs(), charFormats()
327 { }
328
329 Text(const Text &other) = default;
330 Text &operator=(const Text &other) = default;
331 };
332
333 struct Arrow
334 {
335 const std::string path;
336 const std::string viewbox;
337 const double scale;
338
339 explicit Arrow(const std::string &d, const std::string &vbox = "0 0 10 10", double s = 3)
340 : path(d), viewbox(vbox), scale(s)
341 { }
342 };
343
344 struct Frame
345 {
346 double width;
347 boost::optional<Color> color;
348 boost::optional<Color> gapColor;
349 const LineStyle *lineStyle;
350 const Arrow *startArrow;
351 const Arrow *endArrow;
352
353 Frame()
354 : width(1.0), color(), gapColor(), lineStyle(nullptr), startArrow(nullptr), endArrow(nullptr)
355 { }
356
357 Frame(const Frame &other) = default;
358 Frame &operator=(const Frame &other) = default;
359 };
360
361 struct LinkedTextSettings
362 {
363 unsigned linkId;
364 unsigned offsetIntoText;
365 unsigned linkedIndex;
366 unsigned nextLinkedIndex;
367 boost::optional<unsigned> textLength;
368
369 LinkedTextSettings()
370 : linkId(0), offsetIntoText(0), linkedIndex(0), nextLinkedIndex(0), textLength()
371 { }
372 };
373
374 struct TextObject
375 {
376 LinkedTextSettings linkSettings;
377 boost::optional<std::shared_ptr<Text>> text;
378
379 TextObject()
380 : linkSettings(), text()
381 { }
382
383 bool isLinked() const;
384 };
385
386 struct TextSettings
387 {
388 unsigned columnsCount;
389 double gutterWidth;
390 VerticalAlignment verticalAlignment;
391 Rect inset;
392 double rotation;
393 double skew;
394
395 TextSettings()
396 : columnsCount(1), gutterWidth(12.0), verticalAlignment(VerticalAlignment::TOP), inset(), rotation(0), skew(0)
397 { }
398 };
399
400 enum class TextPathAlignment
401 {
402 ASCENT,
403 CENTER,
404 BASELINE,
405 DESCENT
406 };
407
408 enum class TextPathLineAlignment
409 {
410 TOP,
411 CENTER,
412 BOTTOM
413 };
414
415 struct TextPathSettings
416 {
417 bool rotate;
418 bool skew;
419 TextPathAlignment alignment;
420 TextPathLineAlignment lineAlignment;
421
422 TextPathSettings()
423 : rotate(false), skew(false), alignment(TextPathAlignment::BASELINE), lineAlignment(TextPathLineAlignment::TOP)
424 { }
425 };
426
427 struct CurveComponent
428 {
429 Rect boundingBox;
430 std::vector<Point> points;
431
432 CurveComponent()
433 : boundingBox(), points()
434 { }
435 };
436
437 struct Object
438 {
439 Rect boundingBox;
440 bool runaround; // we probably don't need other runaround properties because ODF doesn't support them
441 unsigned zIndex;
442
443 protected:
444 Object()
445 : boundingBox(), runaround(false), zIndex(0)
446 { }
447 };
448
449 struct Line : Object
450 {
451 double rotation;
452 Frame style;
453 std::vector<CurveComponent> curveComponents;
454
455 Line()
456 : rotation(0), style(), curveComponents()
457 { }
458 };
459
460 struct TextPath : Line, TextObject
461 {
462 TextPathSettings settings;
463
464 TextPath()
465 : settings()
466 { }
467 };
468
469 enum class CornerType
470 {
471 DEFAULT,
472 ROUNDED,
473 BEVELED,
474 CONCAVE
475 };
476
477 enum class BoxType
478 {
479 UNKNOWN,
480 RECTANGLE,
481 OVAL,
482 POLYGON,
483 BEZIER
484 };
485
486 struct Box : Object
487 {
488 boost::optional<Fill> fill;
489 Frame frame;
490 BoxType boxType;
491 CornerType cornerType;
492 double cornerRadius;
493 double rotation;
494 std::vector<Point> customPoints;
495 std::vector<CurveComponent> curveComponents;
496
497 Box()
498 : fill(), frame(), boxType(BoxType::UNKNOWN), cornerType(CornerType::DEFAULT), cornerRadius(0.0), rotation(0),
499 customPoints(), curveComponents()
500 { }
501 };
502
503 struct TextBox : Box, TextObject
504 {
505 TextSettings settings;
506
507 TextBox()
508 : settings()
509 { }
510 };
511
512 struct PictureBox : Box
513 {
514 double pictureRotation;
515 double pictureSkew;
516 double offsetLeft;
517 double offsetTop;
518 double scaleHor;
519 double scaleVert;
520
521 PictureBox()
522 : pictureRotation(0.0), pictureSkew(0.0),
523 offsetLeft(0.0), offsetTop(0.0), scaleHor(0.0), scaleVert(0.0)
524 { }
525 };
526
527 struct Group : Object
528 {
529 std::vector<unsigned> objectsIndexes;
530
531 Group()
532 : objectsIndexes()
533 { }
534 };
535
536 struct PageSettings
537 {
538 Rect offset;
539
540 PageSettings()
541 : offset()
542 { }
543 };
544
545 struct Page
546 {
547 std::vector<PageSettings> pageSettings;
548 unsigned objectsCount;
549
550 Page()
551 : pageSettings(), objectsCount(0)
552 { }
553
554 bool isFacing() const
555 {
556 return pageSettings.size() == 2;
557 }
558 };
559
560 struct QXPDocumentProperties
561 {
562 QXPDocumentProperties()
563 : superscriptOffset(1.0 / 3)
564 , superscriptHScale(1.0)
565 , superscriptVScale(1.0)
566 , subscriptOffset(-1.0 / 3)
567 , subscriptHScale(1.0)
568 , subscriptVScale(1.0)
569 , superiorHScale(0.5)
570 , superiorVScale(0.5)
571 , m_autoLeading(0.2)
572 {
573 }
574
575 double superscriptOffset;
576 double superscriptHScale;
577 double superscriptVScale;
578 double subscriptOffset;
579 double subscriptHScale;
580 double subscriptVScale;
581 double superiorHScale;
582 double superiorVScale;
583
584 void setAutoLeading(const double val);
585 double autoLeading() const;
586
587 // there should be a flag to detect this...
588 bool isIncrementalAutoLeading() const
589 {
590 return autoLeading() < 0 || autoLeading() > 1;
591 }
592
593 private:
594 double m_autoLeading;
595 };
596
597 }
598
599 #endif // QXPTYPES_H_INCLUDED
600
601 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libqxp::Line
Definition: QXPTypes.h:449
libqxp::TextPathAlignment
TextPathAlignment
Definition: QXPTypes.h:400
libqxp::LineStyle::LineStyle
LineStyle()
Definition: QXPTypes.h:135
libqxp::Group::Group
Group()
Definition: QXPTypes.h:531
libqxp::CharFormat::bold
bool bold
Definition: QXPTypes.h:150
libqxp::TextSpec::length
const unsigned length
Definition: QXPTypes.h:277
libqxp::CurveComponent::boundingBox
Rect boundingBox
Definition: QXPTypes.h:429
libqxp::Rect::width
double width() const
Definition: QXPTypes.cpp:58
libqxp::Point::Point
Point()
Definition: QXPTypes.h:29
libqxp::Rect::bottom
double bottom
Definition: QXPTypes.h:50
libqxp::QXPDocumentProperties::superiorVScale
double superiorVScale
Definition: QXPTypes.h:582
libqxp::Object
Definition: QXPTypes.h:437
libqxp::BoxType::UNKNOWN
libqxp::Rect::shrink
Rect shrink(const double diff) const
Definition: QXPTypes.cpp:93
libqxp::ParagraphFormat::ruleAbove
std::shared_ptr< ParagraphRule > ruleAbove
Definition: QXPTypes.h:254
libqxp::CurveComponent
Definition: QXPTypes.h:427
libqxp::TabStop::fillChar
librevenge::RVNGString fillChar
Definition: QXPTypes.h:220
libqxp::CharFormat::superior
bool superior
Definition: QXPTypes.h:157
libqxp::TabStop::isDefined
bool isDefined() const
Definition: QXPTypes.h:223
libqxp::Text::operator=
Text & operator=(const Text &other)=default
libqxp::TextBox::settings
TextSettings settings
Definition: QXPTypes.h:505
libqxp::Point::rotateDeg
Point rotateDeg(double rotationDeg, const Point &center) const
Definition: QXPTypes.cpp:33
libqxp::LineCapType
LineCapType
Definition: QXPTypes.h:111
libqxp::GradientType::RECTANGULAR
libqxp::TextSpec::endIndex
unsigned endIndex() const
Definition: QXPTypes.h:279
libqxp::BoxType
BoxType
Definition: QXPTypes.h:477
libqxp::Frame::Frame
Frame()
Definition: QXPTypes.h:353
libqxp::Text::paragraphs
std::vector< ParagraphSpec > paragraphs
Definition: QXPTypes.h:319
libqxp
Definition: libqxp_utils.cpp:24
libqxp::Box::frame
Frame frame
Definition: QXPTypes.h:489
libqxp::TextPath::TextPath
TextPath()
Definition: QXPTypes.h:464
libqxp::PictureBox::pictureSkew
double pictureSkew
Definition: QXPTypes.h:515
libqxp::HJ::singleWordJustify
bool singleWordJustify
Definition: QXPTypes.h:188
libqxp::ParagraphRule::leftMargin
double leftMargin
Definition: QXPTypes.h:238
libqxp::TextPathAlignment::BASELINE
libqxp::ParagraphFormat::margin
Rect margin
Definition: QXPTypes.h:250
libqxp::QXPDocumentProperties::superscriptVScale
double superscriptVScale
Definition: QXPTypes.h:577
libqxp::Point::y
double y
Definition: QXPTypes.h:27
libqxp::Frame::lineStyle
const LineStyle * lineStyle
Definition: QXPTypes.h:349
libqxp::TextSettings::gutterWidth
double gutterWidth
Definition: QXPTypes.h:389
libqxp::BoxType::OVAL
libqxp::TextPathSettings::skew
bool skew
Definition: QXPTypes.h:418
libqxp::CharFormat::fontName
librevenge::RVNGString fontName
Definition: QXPTypes.h:146
libqxp::CornerType::ROUNDED
libqxp::TextPath::settings
TextPathSettings settings
Definition: QXPTypes.h:462
libqxp::CharFormat::allCaps
bool allCaps
Definition: QXPTypes.h:159
libqxp::Rect::left
double left
Definition: QXPTypes.h:51
libqxp::LinkedTextSettings
Definition: QXPTypes.h:361
libqxp::HJ::minBefore
unsigned minBefore
Definition: QXPTypes.h:185
libqxp::CharFormat::isControlChars
bool isControlChars
Definition: QXPTypes.h:163
libqxp::Color::Color
Color()
Definition: QXPTypes.h:74
libqxp::HJ::hyphenate
bool hyphenate
Definition: QXPTypes.h:184
libqxp::QXPDocumentProperties::QXPDocumentProperties
QXPDocumentProperties()
Definition: QXPTypes.h:562
libqxp::TextPath
Definition: QXPTypes.h:460
libqxp::ParagraphFormat::alignment
HorizontalAlignment alignment
Definition: QXPTypes.h:249
libqxp::Page::pageSettings
std::vector< PageSettings > pageSettings
Definition: QXPTypes.h:547
libqxp::CharFormat::smallCaps
bool smallCaps
Definition: QXPTypes.h:160
libqxp::QXPDocumentProperties::isIncrementalAutoLeading
bool isIncrementalAutoLeading() const
Definition: QXPTypes.h:588
libqxp::operator!=
bool operator!=(const Point &lhs, const Point &rhs)
Definition: QXPTypes.cpp:23
libqxp::CharFormat::baselineShift
double baselineShift
Definition: QXPTypes.h:148
libqxp::ContentType::UNKNOWN
libqxp::Box::boxType
BoxType boxType
Definition: QXPTypes.h:490
libqxp::PageSettings::offset
Rect offset
Definition: QXPTypes.h:538
libqxp::CharFormat::subscript
bool subscript
Definition: QXPTypes.h:156
libqxp::Color::red
uint8_t red
Definition: QXPTypes.h:70
libqxp::Color::toString
librevenge::RVNGString toString() const
Definition: QXPTypes.cpp:98
libqxp::LineStyle::LineStyle
LineStyle(std::vector< double > segments, bool proportional, double pattern, LineCapType endcap, LineJoinType join)
Definition: QXPTypes.h:139
libqxp::Rect::Rect
Rect()
Definition: QXPTypes.cpp:50
libqxp::Group
Definition: QXPTypes.h:527
libqxp::Frame::endArrow
const Arrow * endArrow
Definition: QXPTypes.h:351
libqxp::ParagraphFormat::ruleBelow
std::shared_ptr< ParagraphRule > ruleBelow
Definition: QXPTypes.h:255
libqxp::CharFormat::italic
bool italic
Definition: QXPTypes.h:151
libqxp::GradientType::DIAMOND
libqxp::Gradient::color1
Color color1
Definition: QXPTypes.h:100
libqxp::LineStyle::segmentLengths
std::vector< double > segmentLengths
Definition: QXPTypes.h:128
libqxp::Object::runaround
bool runaround
Definition: QXPTypes.h:440
libqxp::PageSettings::PageSettings
PageSettings()
Definition: QXPTypes.h:540
libqxp::CharFormat::color
Color color
Definition: QXPTypes.h:149
libqxp::TextSettings::columnsCount
unsigned columnsCount
Definition: QXPTypes.h:388
libqxp::TextPathLineAlignment
TextPathLineAlignment
Definition: QXPTypes.h:408
libqxp::Arrow::scale
const double scale
Definition: QXPTypes.h:337
libqxp::QXPDocumentProperties
Definition: QXPTypes.h:560
libqxp::TextBox::TextBox
TextBox()
Definition: QXPTypes.h:507
libqxp::TabStopType::ALIGN
libqxp::LineStyle::isStripe
bool isStripe
Definition: QXPTypes.h:129
libqxp::LineJoinType
LineJoinType
Definition: QXPTypes.h:119
libqxp::CharFormat::superscript
bool superscript
Definition: QXPTypes.h:155
libqxp::operator==
bool operator==(const Point &lhs, const Point &rhs)
Definition: QXPTypes.cpp:18
libqxp::LineCapType::RECT
libqxp::Gradient::type
GradientType type
Definition: QXPTypes.h:99
libqxp::CornerType::DEFAULT
libqxp::CharFormatSpec::format
std::shared_ptr< CharFormat > format
Definition: QXPTypes.h:299
libqxp::TabStop::position
double position
Definition: QXPTypes.h:219
libqxp::PageSettings
Definition: QXPTypes.h:536
libqxp::ParagraphRule::lineStyle
const LineStyle * lineStyle
Definition: QXPTypes.h:237
libqxp::ContentType::NONE
libqxp::CornerType::BEVELED
libqxp::GradientType::MIDLINEAR
libqxp::Point
Definition: QXPTypes.h:24
libqxp::Gradient::angle
double angle
Definition: QXPTypes.h:102
libqxp::QXPDocumentProperties::superscriptHScale
double superscriptHScale
Definition: QXPTypes.h:576
libqxp::ParagraphSpec::ParagraphSpec
ParagraphSpec(const std::shared_ptr< ParagraphFormat > &f, unsigned start, unsigned len)
Definition: QXPTypes.h:310
libqxp::Line::rotation
double rotation
Definition: QXPTypes.h:451
libqxp::GradientType::LINEAR
libqxp::LinkedTextSettings::linkId
unsigned linkId
Definition: QXPTypes.h:363
libqxp::ParagraphFormat::hj
std::shared_ptr< HJ > hj
Definition: QXPTypes.h:257
libqxp::ParagraphRule::rightMargin
double rightMargin
Definition: QXPTypes.h:239
libqxp::QXPDocumentProperties::m_autoLeading
double m_autoLeading
Definition: QXPTypes.h:594
libqxp::TextPathSettings::alignment
TextPathAlignment alignment
Definition: QXPTypes.h:419
libqxp::Box::rotation
double rotation
Definition: QXPTypes.h:493
libqxp::VerticalAlignment
VerticalAlignment
Definition: QXPTypes.h:200
libqxp::Arrow::Arrow
Arrow(const std::string &d, const std::string &vbox="0 0 10 10", double s=3)
Definition: QXPTypes.h:339
libqxp::QXPDocumentProperties::autoLeading
double autoLeading() const
Definition: QXPTypes.cpp:171
libqxp::CurveComponent::points
std::vector< Point > points
Definition: QXPTypes.h:430
libqxp::Group::objectsIndexes
std::vector< unsigned > objectsIndexes
Definition: QXPTypes.h:529
libqxp::Box::cornerRadius
double cornerRadius
Definition: QXPTypes.h:492
libqxp::TextSpec
Definition: QXPTypes.h:274
libqxp::Arrow
Definition: QXPTypes.h:333
libqxp::TextSettings::skew
double skew
Definition: QXPTypes.h:393
libqxp::LineCapType::STRETCH
libqxp::LineCapType::BUTT
libqxp::CharFormatSpec
Definition: QXPTypes.h:297
libqxp::HJ::HJ
HJ()
Definition: QXPTypes.h:175
libqxp::LinkedTextSettings::LinkedTextSettings
LinkedTextSettings()
Definition: QXPTypes.h:369
libqxp::Line::Line
Line()
Definition: QXPTypes.h:455
libqxp::ParagraphSpec
Definition: QXPTypes.h:306
libqxp::HorizontalAlignment::CENTER
libqxp::CornerType::CONCAVE
libqxp::QXPDocumentProperties::setAutoLeading
void setAutoLeading(const double val)
Definition: QXPTypes.cpp:159
libqxp::LinkedTextSettings::linkedIndex
unsigned linkedIndex
Definition: QXPTypes.h:365
libqxp::HorizontalAlignment::RIGHT
libqxp::CharFormat::outline
bool outline
Definition: QXPTypes.h:153
libqxp::QXPDocumentProperties::subscriptHScale
double subscriptHScale
Definition: QXPTypes.h:579
libqxp::HorizontalAlignment::LEFT
libqxp::Box::cornerType
CornerType cornerType
Definition: QXPTypes.h:491
libqxp::Arrow::path
const std::string path
Definition: QXPTypes.h:335
libqxp::TextSpec::startIndex
const unsigned startIndex
Definition: QXPTypes.h:276
libqxp::TextSpec::overlaps
bool overlaps(const TextSpec &other) const
Definition: QXPTypes.cpp:118
libqxp::Color::Color
Color(uint8_t r, uint8_t g, uint8_t b)
Definition: QXPTypes.h:78
libqxp::BoxType::POLYGON
libqxp::HJ
Definition: QXPTypes.h:173
libqxp::Box::Box
Box()
Definition: QXPTypes.h:497
libqxp::Rect::bottomLeft
Point bottomLeft() const
Definition: QXPTypes.cpp:88
libqxp::Text
Definition: QXPTypes.h:315
libqxp::ParagraphRule::ParagraphRule
ParagraphRule()
Definition: QXPTypes.h:242
libqxp::TabStopType
TabStopType
Definition: QXPTypes.h:208
libqxp::ContentType::PICTURE
libqxp::LineJoinType::MITER
libqxp::Box::curveComponents
std::vector< CurveComponent > curveComponents
Definition: QXPTypes.h:495
libqxp::GradientType::FULLCIRCULAR
libqxp::Box::customPoints
std::vector< Point > customPoints
Definition: QXPTypes.h:494
libqxp::LineStyle::endcapType
LineCapType endcapType
Definition: QXPTypes.h:132
libqxp::CharFormatSpec::CharFormatSpec
CharFormatSpec(const std::shared_ptr< CharFormat > &f, unsigned start, unsigned len)
Definition: QXPTypes.h:301
libqxp::Frame::operator=
Frame & operator=(const Frame &other)=default
libqxp::TextPathSettings::TextPathSettings
TextPathSettings()
Definition: QXPTypes.h:422
libqxp::Rect::right
double right
Definition: QXPTypes.h:49
libqxp::Page::objectsCount
unsigned objectsCount
Definition: QXPTypes.h:548
libqxp::TextObject::isLinked
bool isLinked() const
Definition: QXPTypes.cpp:154
libqxp::LinkedTextSettings::nextLinkedIndex
unsigned nextLinkedIndex
Definition: QXPTypes.h:366
libqxp::Text::charFormats
std::vector< CharFormatSpec > charFormats
Definition: QXPTypes.h:320
libqxp::Rect::bottomRight
Point bottomRight() const
Definition: QXPTypes.cpp:83
libqxp::Point::distance
double distance(const Point &p2) const
Definition: QXPTypes.cpp:45
libqxp::LinkedTextSettings::textLength
boost::optional< unsigned > textLength
Definition: QXPTypes.h:367
libqxp::ParagraphRule::width
double width
Definition: QXPTypes.h:235
libqxp::Gradient::Gradient
Gradient()
Definition: QXPTypes.h:104
libqxp::Color::blue
uint8_t blue
Definition: QXPTypes.h:72
libqxp::LineStyle::isProportional
bool isProportional
Definition: QXPTypes.h:130
libqxp::PictureBox::pictureRotation
double pictureRotation
Definition: QXPTypes.h:514
libqxp::BoxType::BEZIER
libqxp::Line::curveComponents
std::vector< CurveComponent > curveComponents
Definition: QXPTypes.h:453
libqxp::TextObject
Definition: QXPTypes.h:374
libqxp::HorizontalAlignment::FORCED
libqxp::LineCapType::ROUND
libqxp::CharFormat::wordUnderline
bool wordUnderline
Definition: QXPTypes.h:161
libqxp::TextSettings::rotation
double rotation
Definition: QXPTypes.h:392
libqxp::Page::isFacing
bool isFacing() const
Definition: QXPTypes.h:554
libqxp::Rect::topRight
Point topRight() const
Definition: QXPTypes.cpp:78
libqxp::ParagraphSpec::format
std::shared_ptr< ParagraphFormat > format
Definition: QXPTypes.h:308
libqxp::TextSettings::inset
Rect inset
Definition: QXPTypes.h:391
libqxp::ParagraphFormat::firstLineIndent
double firstLineIndent
Definition: QXPTypes.h:251
libqxp::CurveComponent::CurveComponent
CurveComponent()
Definition: QXPTypes.h:432
libqxp::Point::Point
Point(double xVal, double yVal)
Definition: QXPTypes.h:33
libqxp::Frame::startArrow
const Arrow * startArrow
Definition: QXPTypes.h:350
libqxp::ParagraphRule::color
Color color
Definition: QXPTypes.h:236
libqxp::Rect::topLeft
Point topLeft() const
Definition: QXPTypes.cpp:73
libqxp::TextObject::TextObject
TextObject()
Definition: QXPTypes.h:379
libqxp::Text::Text
Text()
Definition: QXPTypes.h:325
libqxp::ParagraphFormat::leading
double leading
Definition: QXPTypes.h:252
libqxp::QXPDocumentProperties::superscriptOffset
double superscriptOffset
Definition: QXPTypes.h:575
libqxp::TextPathSettings::lineAlignment
TextPathLineAlignment lineAlignment
Definition: QXPTypes.h:420
libqxp::Box::fill
boost::optional< Fill > fill
Definition: QXPTypes.h:488
libqxp::TextObject::text
boost::optional< std::shared_ptr< Text > > text
Definition: QXPTypes.h:377
libqxp::Rect::top
double top
Definition: QXPTypes.h:48
libqxp::TabStop::TabStop
TabStop()
Definition: QXPTypes.h:228
libqxp::CharFormat::shadow
bool shadow
Definition: QXPTypes.h:154
libqxp::ParagraphRule::offset
double offset
Definition: QXPTypes.h:240
libqxp::Color::applyShade
Color applyShade(double shade) const
Definition: QXPTypes.cpp:105
libqxp::TextPathSettings
Definition: QXPTypes.h:415
libqxp::VerticalAlignment::BOTTOM
libqxp::CharFormat::strike
bool strike
Definition: QXPTypes.h:158
libqxp::LineStyle::patternLength
double patternLength
Definition: QXPTypes.h:131
libqxp::LineJoinType::BEVEL
libqxp::CharFormat
Definition: QXPTypes.h:144
libqxp::GradientType
GradientType
Definition: QXPTypes.h:87
libqxp::Box
Definition: QXPTypes.h:486
libqxp::QXPDocumentProperties::superiorHScale
double superiorHScale
Definition: QXPTypes.h:581
libqxp::Line::style
Frame style
Definition: QXPTypes.h:452
libqxp::Gradient
Definition: QXPTypes.h:97
libqxp::Point::x
double x
Definition: QXPTypes.h:26
libqxp::Text::maxFontSize
double maxFontSize() const
Definition: QXPTypes.cpp:123
libqxp::PictureBox::offsetTop
double offsetTop
Definition: QXPTypes.h:517
libqxp::CharFormat::fontSize
double fontSize
Definition: QXPTypes.h:147
libqxp::HJ::minAfter
unsigned minAfter
Definition: QXPTypes.h:186
libqxp::GradientType::CIRCULAR
libqxp::LinkedTextSettings::offsetIntoText
unsigned offsetIntoText
Definition: QXPTypes.h:364
libqxp::ParagraphFormat
Definition: QXPTypes.h:247
libqxp::Color::green
uint8_t green
Definition: QXPTypes.h:71
libqxp::TextPathSettings::rotate
bool rotate
Definition: QXPTypes.h:417
libqxp::CharFormat::underline
bool underline
Definition: QXPTypes.h:152
libqxp::ParagraphFormat::tabStops
std::vector< TabStop > tabStops
Definition: QXPTypes.h:256
libqxp::HorizontalAlignment
HorizontalAlignment
Definition: QXPTypes.h:191
libqxp::TextSettings::TextSettings
TextSettings()
Definition: QXPTypes.h:395
libqxp::Object::zIndex
unsigned zIndex
Definition: QXPTypes.h:441
libqxp::Rect
Definition: QXPTypes.h:46
libqxp::Frame::color
boost::optional< Color > color
Definition: QXPTypes.h:347
libqxp::TabStop::type
TabStopType type
Definition: QXPTypes.h:218
libqxp::Text::text
std::string text
Definition: QXPTypes.h:317
libqxp::QXPDocumentProperties::subscriptOffset
double subscriptOffset
Definition: QXPTypes.h:578
libqxp_utils.h
libqxp::TextSpec::TextSpec
TextSpec(unsigned start, unsigned len)
Definition: QXPTypes.h:292
libqxp::ParagraphFormat::incrementalLeading
bool incrementalLeading
Definition: QXPTypes.h:253
libqxp::PictureBox::scaleVert
double scaleVert
Definition: QXPTypes.h:519
libqxp::HorizontalAlignment::JUSTIFIED
libqxp::Text::encoding
const char * encoding
Definition: QXPTypes.h:318
libqxp::TabStop::alignChar
librevenge::RVNGString alignChar
Definition: QXPTypes.h:221
libqxp::CornerType
CornerType
Definition: QXPTypes.h:469
libqxp::Arrow::viewbox
const std::string viewbox
Definition: QXPTypes.h:336
libqxp::Page::Page
Page()
Definition: QXPTypes.h:550
libqxp::PictureBox::PictureBox
PictureBox()
Definition: QXPTypes.h:521
libqxp::VerticalAlignment::TOP
libqxp::Fill
boost::variant< Color, Gradient > Fill
Definition: QXPTypes.h:109
libqxp::CharFormat::CharFormat
CharFormat()
Definition: QXPTypes.h:165
libqxp::ParagraphRule
Definition: QXPTypes.h:233
libqxp::PictureBox::offsetLeft
double offsetLeft
Definition: QXPTypes.h:516
libqxp::LineStyle
Definition: QXPTypes.h:126
libqxp::ContentType
ContentType
Definition: QXPTypes.h:265
libqxp::Point::move
Point move(double dx, double dy) const
Definition: QXPTypes.cpp:28
libqxp::ContentType::OBJECTS
libqxp::Page
Definition: QXPTypes.h:545
libqxp::Object::boundingBox
Rect boundingBox
Definition: QXPTypes.h:439
libqxp::TabStop
Definition: QXPTypes.h:216
libqxp::BoxType::RECTANGLE
libqxp::TextBox
Definition: QXPTypes.h:503
libqxp::Rect::center
Point center() const
Definition: QXPTypes.cpp:68
libqxp::PictureBox
Definition: QXPTypes.h:512
libqxp::Frame::gapColor
boost::optional< Color > gapColor
Definition: QXPTypes.h:348
libqxp::TextPathAlignment::DESCENT
libqxp::Frame::width
double width
Definition: QXPTypes.h:346
libqxp::QXPDocumentProperties::subscriptVScale
double subscriptVScale
Definition: QXPTypes.h:580
libqxp::PictureBox::scaleHor
double scaleHor
Definition: QXPTypes.h:518
libqxp::TextObject::linkSettings
LinkedTextSettings linkSettings
Definition: QXPTypes.h:376
libqxp::Color
Definition: QXPTypes.h:68
libqxp::ContentType::TEXT
libqxp::Rect::height
double height() const
Definition: QXPTypes.cpp:63
libqxp::ParagraphFormat::ParagraphFormat
ParagraphFormat()
Definition: QXPTypes.h:259
libqxp::TextSettings::verticalAlignment
VerticalAlignment verticalAlignment
Definition: QXPTypes.h:390
libqxp::Frame
Definition: QXPTypes.h:344
libqxp::LineStyle::joinType
LineJoinType joinType
Definition: QXPTypes.h:133
libqxp::TextSettings
Definition: QXPTypes.h:386
libqxp::TextSpec::afterEndIndex
unsigned afterEndIndex() const
Definition: QXPTypes.h:284
libqxp::Object::Object
Object()
Definition: QXPTypes.h:444
libqxp::HJ::maxInRow
unsigned maxInRow
Definition: QXPTypes.h:187
libqxp::Gradient::color2
Color color2
Definition: QXPTypes.h:101
libqxp::TextPathAlignment::ASCENT