geometry.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 libpagemaker 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 __LIBPAGEMAKER_GEOMETRY_H__
11#define __LIBPAGEMAKER_GEOMETRY_H__
12
13#include <string>
14#include <utility>
15#include <vector>
16
17#include <librevenge/librevenge.h>
18
19#include "PMDTypes.h"
20#include "Units.h"
21#include "constants.h"
22#include "libpagemaker_utils.h"
23
24namespace libpagemaker
25{
26template <typename Unit> struct Point
27{
28 Unit m_x;
29 Unit m_y;
30
31 Point(Unit x, Unit y) : m_x(x), m_y(y)
32 { }
33};
34
37
39{
41 uint32_t m_skewDegree;
45 uint32_t m_xformId;
46
47 PMDXForm(const uint32_t rotationDegree, const uint32_t skewDegree, const PMDShapePoint xformTopLeft, const PMDShapePoint xformBotRight, const PMDShapePoint rotatingPoint, const uint32_t xformId)
48 : m_rotationDegree(rotationDegree), m_skewDegree(skewDegree), m_xformTopLeft(xformTopLeft), m_xformBotRight(xformBotRight), m_rotatingPoint(rotatingPoint), m_xformId(xformId)
49 { }
50};
51
53{
54public:
55 virtual std::vector<PMDShapePoint> getPoints() const = 0;
56 virtual bool getIsClosed() const = 0;
57 virtual double getRotation() const = 0;
58 virtual double getSkew() const = 0;
59 virtual PMDShapePoint getRotatingPoint() const = 0;
60 virtual PMDShapePoint getXformTopLeft() const = 0;
61 virtual PMDShapePoint getXformBotRight() const = 0;
62 virtual uint8_t shapeType() const = 0;
63 virtual PMDShapePoint getBboxTopLeft() const = 0;
64 virtual PMDShapePoint getBboxBotRight() const = 0;
67 virtual std::string getText() const = 0;
68 virtual std::vector<PMDCharProperties> getCharProperties() const = 0;
69 virtual std::vector<PMDParaProperties> getParaProperties() const = 0;
70 virtual librevenge::RVNGBinaryData getBitmap() const = 0;
71
72
73 virtual ~PMDLineSet()
74 {
75 }
76};
77
78class PMDLine : public PMDLineSet
79{
84
85public:
86 PMDLine(const PMDShapePoint &bboxTopLeft, const PMDShapePoint &bboxBotRight, const bool mirrored, const PMDStrokeProperties strokeProps)
87 : m_bboxTopLeft(bboxTopLeft), m_bboxBotRight(bboxBotRight), m_mirrored(mirrored), m_strokeProps(strokeProps)
88 { }
89
90 double getRotation() const override
91 {
92 return 0;
93 }
94
95 double getSkew() const override
96 {
97 return 0;
98 }
99
101 {
102 return PMDShapePoint(0,0);
103 }
104
106 {
107 return PMDShapePoint(0,0);
108 }
109
111 {
112 return PMDShapePoint(0,0);
113 }
114
115 bool getIsClosed() const override
116 {
117 return false;
118 }
119
121 {
122 return m_bboxTopLeft;
123 }
124
126 {
127 return m_bboxBotRight;
128 }
129
130 std::vector<PMDShapePoint> getPoints() const override
131 {
132 std::vector<PMDShapePoint> points;
133
134 if (m_mirrored)
135 {
138 }
139 else
140 {
141 points.push_back(m_bboxTopLeft);
142 points.push_back(m_bboxBotRight);
143 }
144 return points;
145 }
146
147 uint8_t shapeType() const override
148 {
149 return SHAPE_TYPE_LINE;
150 }
151
153 {
154 PMDFillProperties props;
155 props.m_fillType = FILL_SOLID;
156 return props;
157 }
158
160 {
161 return m_strokeProps;
162 }
163
164 std::string getText() const override
165 {
166 return "";
167 }
168
169 std::vector<PMDCharProperties> getCharProperties() const override
170 {
171 return std::vector<PMDCharProperties>(1);
172 }
173
174 std::vector<PMDParaProperties> getParaProperties() const override
175 {
176 return std::vector<PMDParaProperties>(1);
177 }
178
179 librevenge::RVNGBinaryData getBitmap() const override
180 {
181 librevenge::RVNGBinaryData temp;
182 return temp;
183 }
184
185 ~PMDLine() override
186 {
187 }
188};
189
190
191class PMDPolygon : public PMDLineSet
192{
193 std::vector<PMDShapePoint> m_points;
200
201public:
202 PMDPolygon(std::vector<PMDShapePoint> points, bool isClosed, const PMDShapePoint &bboxTopLeft, const PMDShapePoint &bboxBotRight, const PMDXForm &xFormContainer, const PMDFillProperties fillProps, const PMDStrokeProperties strokeProps)
203 : m_points(std::move(points)), m_isClosed(isClosed), m_bboxTopLeft(bboxTopLeft), m_bboxBotRight(bboxBotRight), m_xFormContainer(xFormContainer), m_fillProps(fillProps), m_strokeProps(strokeProps)
204 { }
205
206 double getRotation() const override
207 {
208 auto temp = (int32_t)m_xFormContainer.m_rotationDegree;
209 return (-1 * (double)temp/1000 * (M_PI/180));
210 }
211
212 double getSkew() const override
213 {
214 auto temp = (int32_t)m_xFormContainer.m_skewDegree;
215 return (-1 * (double)temp/1000 * (M_PI/180));
216 }
217
219 {
221 }
222
224 {
226 }
227
229 {
231 }
232
234 {
235 return m_bboxTopLeft;
236 }
237
239 {
240 return m_bboxBotRight;
241 }
242
243 bool getIsClosed() const override
244 {
245 return m_isClosed;
246 }
247
248 std::vector<PMDShapePoint> getPoints() const override
249 {
250 return m_points;
251 }
252
253 uint8_t shapeType() const override
254 {
255 return SHAPE_TYPE_POLY;
256 }
257
259 {
260 return m_fillProps;
261 }
262
264 {
265 return m_strokeProps;
266 }
267
268 std::string getText() const override
269 {
270 return "";
271 }
272
273 std::vector<PMDCharProperties> getCharProperties() const override
274 {
275 return std::vector<PMDCharProperties>(1);
276 }
277
278 std::vector<PMDParaProperties> getParaProperties() const override
279 {
280 return std::vector<PMDParaProperties>(1);
281 }
282
283 librevenge::RVNGBinaryData getBitmap() const override
284 {
285 librevenge::RVNGBinaryData temp;
286 return temp;
287 }
288
289 ~PMDPolygon() override
290 {
291 }
292};
293
294class PMDTextBox : public PMDLineSet
295{
299 std::string m_text;
300 std::vector<PMDCharProperties> m_charProps;
301 std::vector<PMDParaProperties> m_paraProps;
302
303public:
304 PMDTextBox(const PMDShapePoint &bboxTopLeft, const PMDShapePoint &bboxBotRight, const PMDXForm &xFormContainer, std::string text, std::vector<PMDCharProperties> charProps, std::vector<PMDParaProperties> paraProps)
305 : m_bboxTopLeft(bboxTopLeft), m_bboxBotRight(bboxBotRight),m_xFormContainer(xFormContainer), m_text(std::move(text)), m_charProps(std::move(charProps)), m_paraProps(std::move(paraProps))
306 { }
307
308 double getRotation() const override
309 {
310 auto temp = (int32_t)m_xFormContainer.m_rotationDegree;
311 return (-1 * (double)temp/1000 * (M_PI/180));
312 }
313
314 double getSkew() const override
315 {
316 auto temp = (int32_t)m_xFormContainer.m_skewDegree;
317 return (-1 * (double)temp/1000 * (M_PI/180));
318 }
319
321 {
323 }
324
326 {
328 }
329
331 {
333 }
334
336 {
337 return m_bboxTopLeft;
338 }
339
341 {
342 return m_bboxBotRight;
343 }
344
345 bool getIsClosed() const override
346 {
347 return true;
348 }
349
350 std::vector<PMDShapePoint> getPoints() const override
351 {
352 std::vector<PMDShapePoint> points;
353
354 points.push_back(m_bboxTopLeft);
355
356 return points;
357 }
358
359 uint8_t shapeType() const override
360 {
361 return SHAPE_TYPE_TEXTBOX;
362 }
363
365 {
366 return PMDFillProperties();
367 }
368
370 {
371 return PMDStrokeProperties();
372 }
373
374 std::string getText() const override
375 {
376 return m_text;
377 }
378
379 std::vector<PMDCharProperties> getCharProperties() const override
380 {
381 return m_charProps;
382 }
383
384 std::vector<PMDParaProperties> getParaProperties() const override
385 {
386 return m_paraProps;
387 }
388
389 librevenge::RVNGBinaryData getBitmap() const override
390 {
391 librevenge::RVNGBinaryData temp;
392 return temp;
393 }
394
395 ~PMDTextBox() override
396 {
397 }
398};
399
401{
407
408public:
409 PMDRectangle(const PMDShapePoint &bboxTopLeft, const PMDShapePoint &bboxBotRight, const PMDXForm &xFormContainer, const PMDFillProperties fillProps, const PMDStrokeProperties strokeProps)
410 : m_bboxTopLeft(bboxTopLeft), m_bboxBotRight(bboxBotRight),m_xFormContainer(xFormContainer), m_fillProps(fillProps), m_strokeProps(strokeProps)
411 { }
412
413 double getRotation() const override
414 {
415 auto temp = (int32_t)m_xFormContainer.m_rotationDegree;
416 return (-1 * (double)temp/1000 * (M_PI/180));
417 }
418
419 double getSkew() const override
420 {
421 auto temp = (int32_t)m_xFormContainer.m_skewDegree;
422 return (-1 * (double)temp/1000 * (M_PI/180));
423 }
424
426 {
428 }
429
431 {
433 }
434
436 {
438 }
439
441 {
442 return m_bboxTopLeft;
443 }
444
446 {
447 return m_bboxBotRight;
448 }
449
450 bool getIsClosed() const override
451 {
452 return true;
453 }
454
455 std::vector<PMDShapePoint> getPoints() const override
456 {
457 std::vector<PMDShapePoint> points;
458
459 points.push_back(m_bboxTopLeft);
461 points.push_back(m_bboxBotRight);
463
464 return points;
465 }
466
467 uint8_t shapeType() const override
468 {
469 return SHAPE_TYPE_RECT;
470 }
471
473 {
474 return m_fillProps;
475 }
476
478 {
479 return m_strokeProps;
480 }
481
482 std::string getText() const override
483 {
484 return "";
485 }
486
487 std::vector<PMDCharProperties> getCharProperties() const override
488 {
489 return std::vector<PMDCharProperties>(1);
490 }
491
492 std::vector<PMDParaProperties> getParaProperties() const override
493 {
494 return std::vector<PMDParaProperties>(1);
495 }
496
497 librevenge::RVNGBinaryData getBitmap() const override
498 {
499 librevenge::RVNGBinaryData temp;
500 return temp;
501 }
502
503 ~PMDRectangle() override
504 {
505 }
506};
507
508class PMDEllipse : public PMDLineSet
509{
515
516public:
517 PMDEllipse(const PMDShapePoint &bboxTopLeft, const PMDShapePoint &bboxBotRight, const PMDXForm &xFormContainer, const PMDFillProperties fillProps, const PMDStrokeProperties strokeProps)
518 : m_bboxTopLeft(bboxTopLeft), m_bboxBotRight(bboxBotRight), m_xFormContainer(xFormContainer), m_fillProps(fillProps), m_strokeProps(strokeProps)
519 { }
520
521 double getRotation() const override
522 {
523 auto temp = (int32_t)m_xFormContainer.m_rotationDegree;
524 return (-1 * (double)temp/1000 * (M_PI/180));
525 }
526
527 double getSkew() const override
528 {
529 auto temp = (int32_t)m_xFormContainer.m_skewDegree;
530 return (-1 * (double)temp/1000 * (M_PI/180));
531 }
532
534 {
536 }
537
539 {
541 }
542
544 {
546 }
547
548 bool getIsClosed() const override
549 {
550 return true;
551 }
552
553 std::vector<PMDShapePoint> getPoints() const override
554 {
555 std::vector<PMDShapePoint> points;
556
557 points.push_back(m_bboxTopLeft);
558 points.push_back(m_bboxBotRight);
559
560 return points;
561 }
562
564 {
565 return m_bboxTopLeft;
566 }
567
569 {
570 return m_bboxBotRight;
571 }
572
573 uint8_t shapeType() const override
574 {
575 return SHAPE_TYPE_ELLIPSE;
576 }
577
579 {
580 return m_fillProps;
581 }
582
584 {
585 return m_strokeProps;
586 }
587
588 std::string getText() const override
589 {
590 return "";
591 }
592
593 std::vector<PMDCharProperties> getCharProperties() const override
594 {
595 return std::vector<PMDCharProperties>(1);
596 }
597
598 std::vector<PMDParaProperties> getParaProperties() const override
599 {
600 return std::vector<PMDParaProperties>(1);
601 }
602
603 librevenge::RVNGBinaryData getBitmap() const override
604 {
605 librevenge::RVNGBinaryData temp;
606 return temp;
607 }
608
609 ~PMDEllipse() override
610 {
611 }
612};
613
614class PMDBitmap : public PMDLineSet
615{
619 librevenge::RVNGBinaryData m_bitmap;
620
621public:
622 PMDBitmap(const PMDShapePoint &bboxTopLeft, const PMDShapePoint &bboxBotRight, const PMDXForm &xFormContainer, const librevenge::RVNGBinaryData &bitmap)
623 : m_bboxTopLeft(bboxTopLeft), m_bboxBotRight(bboxBotRight), m_xFormContainer(xFormContainer),m_bitmap(bitmap)
624 { }
625
626 double getRotation() const override
627 {
628 auto temp = (int32_t)m_xFormContainer.m_rotationDegree;
629 return (-1 * (double)temp/1000 * (M_PI/180));
630 }
631
632 double getSkew() const override
633 {
634 auto temp = (int32_t)m_xFormContainer.m_skewDegree;
635 return (-1 * (double)temp/1000 * (M_PI/180));
636 }
637
639 {
641 }
642
644 {
646 }
647
649 {
651 }
652
654 {
655 return m_bboxTopLeft;
656 }
657
659 {
660 return m_bboxBotRight;
661 }
662
663 bool getIsClosed() const override
664 {
665 return true;
666 }
667
668 std::vector<PMDShapePoint> getPoints() const override
669 {
670 std::vector<PMDShapePoint> points;
671
672 points.push_back(m_bboxTopLeft);
674 points.push_back(m_bboxBotRight);
676
677 return points;
678 }
679
680 uint8_t shapeType() const override
681 {
682 return SHAPE_TYPE_BITMAP;
683 }
684
686 {
687 return PMDFillProperties();
688 }
689
691 {
692 return PMDStrokeProperties();
693 }
694
695 std::string getText() const override
696 {
697 return "";
698 }
699
700 std::vector<PMDCharProperties> getCharProperties() const override
701 {
702 return std::vector<PMDCharProperties>(1);
703 }
704
705 std::vector<PMDParaProperties> getParaProperties() const override
706 {
707 return std::vector<PMDParaProperties>(1);
708 }
709
710 librevenge::RVNGBinaryData getBitmap() const override
711 {
712 return m_bitmap;
713 }
714
715 ~PMDBitmap() override
716 {
717 }
718};
719
721{
722 double m_tl, m_tr, m_bl, m_br;
723
724public:
725 TransformationMatrix(double bboxTopLeft, double topRight, double bottomLeft, double bottomRight)
726 : m_tl(bboxTopLeft), m_tr(topRight), m_bl(bottomLeft), m_br(bottomRight)
727 { }
728
729 template <typename Unit> InchPoint transform(const Point<Unit> &point) const
730 {
731 double xInches = point.m_x.toInches(),
732 yInches = point.m_y.toInches();
733 double newX = m_tl * xInches + m_tr * yInches,
734 newY = m_bl * xInches + m_br * yInches;
735 return InchPoint(newX, newY);
736 }
737};
738std::pair<InchPoint, InchPoint>
739getBoundingBox(const PMDLineSet &lineSet, const TransformationMatrix &matrix);
740}
741
742#endif /* __LIBPAGEMAKER_GEOMETRY_H__ */
743
744/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
PMDFillProperties getFillProperties() const override
Definition geometry.h:685
std::vector< PMDCharProperties > getCharProperties() const override
Definition geometry.h:700
PMDShapePoint getXformBotRight() const override
Definition geometry.h:643
std::vector< PMDParaProperties > getParaProperties() const override
Definition geometry.h:705
bool getIsClosed() const override
Definition geometry.h:663
PMDXForm m_xFormContainer
Definition geometry.h:618
std::vector< PMDShapePoint > getPoints() const override
Definition geometry.h:668
PMDShapePoint getBboxTopLeft() const override
Definition geometry.h:653
PMDShapePoint getXformTopLeft() const override
Definition geometry.h:638
librevenge::RVNGBinaryData m_bitmap
Definition geometry.h:619
PMDStrokeProperties getStrokeProperties() const override
Definition geometry.h:690
librevenge::RVNGBinaryData getBitmap() const override
Definition geometry.h:710
PMDShapePoint m_bboxTopLeft
Definition geometry.h:616
PMDShapePoint getRotatingPoint() const override
Definition geometry.h:648
PMDShapePoint getBboxBotRight() const override
Definition geometry.h:658
uint8_t shapeType() const override
Definition geometry.h:680
double getRotation() const override
Definition geometry.h:626
std::string getText() const override
Definition geometry.h:695
double getSkew() const override
Definition geometry.h:632
PMDShapePoint m_bboxBotRight
Definition geometry.h:617
PMDBitmap(const PMDShapePoint &bboxTopLeft, const PMDShapePoint &bboxBotRight, const PMDXForm &xFormContainer, const librevenge::RVNGBinaryData &bitmap)
Definition geometry.h:622
~PMDBitmap() override
Definition geometry.h:715
~PMDEllipse() override
Definition geometry.h:609
PMDEllipse(const PMDShapePoint &bboxTopLeft, const PMDShapePoint &bboxBotRight, const PMDXForm &xFormContainer, const PMDFillProperties fillProps, const PMDStrokeProperties strokeProps)
Definition geometry.h:517
double getRotation() const override
Definition geometry.h:521
PMDFillProperties getFillProperties() const override
Definition geometry.h:578
PMDShapePoint m_bboxTopLeft
Definition geometry.h:510
PMDShapePoint getXformTopLeft() const override
Definition geometry.h:533
std::vector< PMDShapePoint > getPoints() const override
Definition geometry.h:553
PMDShapePoint getBboxBotRight() const override
Definition geometry.h:568
PMDShapePoint getRotatingPoint() const override
Definition geometry.h:543
PMDShapePoint getBboxTopLeft() const override
Definition geometry.h:563
std::vector< PMDCharProperties > getCharProperties() const override
Definition geometry.h:593
PMDShapePoint m_bboxBotRight
Definition geometry.h:511
PMDFillProperties m_fillProps
Definition geometry.h:513
PMDShapePoint getXformBotRight() const override
Definition geometry.h:538
PMDXForm m_xFormContainer
Definition geometry.h:512
PMDStrokeProperties getStrokeProperties() const override
Definition geometry.h:583
uint8_t shapeType() const override
Definition geometry.h:573
bool getIsClosed() const override
Definition geometry.h:548
double getSkew() const override
Definition geometry.h:527
std::vector< PMDParaProperties > getParaProperties() const override
Definition geometry.h:598
PMDStrokeProperties m_strokeProps
Definition geometry.h:514
librevenge::RVNGBinaryData getBitmap() const override
Definition geometry.h:603
std::string getText() const override
Definition geometry.h:588
Definition geometry.h:53
virtual PMDShapePoint getRotatingPoint() const =0
virtual std::vector< PMDShapePoint > getPoints() const =0
virtual ~PMDLineSet()
Definition geometry.h:73
virtual PMDShapePoint getXformBotRight() const =0
virtual PMDShapePoint getBboxTopLeft() const =0
virtual PMDFillProperties getFillProperties() const =0
virtual PMDShapePoint getXformTopLeft() const =0
virtual librevenge::RVNGBinaryData getBitmap() const =0
virtual uint8_t shapeType() const =0
virtual double getRotation() const =0
virtual std::vector< PMDCharProperties > getCharProperties() const =0
virtual std::vector< PMDParaProperties > getParaProperties() const =0
virtual bool getIsClosed() const =0
virtual double getSkew() const =0
virtual PMDShapePoint getBboxBotRight() const =0
virtual std::string getText() const =0
virtual PMDStrokeProperties getStrokeProperties() const =0
PMDLine(const PMDShapePoint &bboxTopLeft, const PMDShapePoint &bboxBotRight, const bool mirrored, const PMDStrokeProperties strokeProps)
Definition geometry.h:86
double getRotation() const override
Definition geometry.h:90
std::vector< PMDShapePoint > getPoints() const override
Definition geometry.h:130
PMDStrokeProperties m_strokeProps
Definition geometry.h:83
double getSkew() const override
Definition geometry.h:95
bool getIsClosed() const override
Definition geometry.h:115
PMDShapePoint getXformTopLeft() const override
Definition geometry.h:100
librevenge::RVNGBinaryData getBitmap() const override
Definition geometry.h:179
PMDShapePoint getBboxBotRight() const override
Definition geometry.h:125
std::vector< PMDParaProperties > getParaProperties() const override
Definition geometry.h:174
PMDShapePoint getXformBotRight() const override
Definition geometry.h:105
PMDShapePoint getBboxTopLeft() const override
Definition geometry.h:120
PMDFillProperties getFillProperties() const override
Definition geometry.h:152
PMDShapePoint m_bboxBotRight
Definition geometry.h:81
std::vector< PMDCharProperties > getCharProperties() const override
Definition geometry.h:169
~PMDLine() override
Definition geometry.h:185
PMDStrokeProperties getStrokeProperties() const override
Definition geometry.h:159
uint8_t shapeType() const override
Definition geometry.h:147
bool m_mirrored
Definition geometry.h:82
std::string getText() const override
Definition geometry.h:164
PMDShapePoint m_bboxTopLeft
Definition geometry.h:80
PMDShapePoint getRotatingPoint() const override
Definition geometry.h:110
PMDShapePoint getBboxBotRight() const override
Definition geometry.h:238
librevenge::RVNGBinaryData getBitmap() const override
Definition geometry.h:283
double getRotation() const override
Definition geometry.h:206
std::vector< PMDParaProperties > getParaProperties() const override
Definition geometry.h:278
PMDXForm m_xFormContainer
Definition geometry.h:197
PMDShapePoint getBboxTopLeft() const override
Definition geometry.h:233
uint8_t shapeType() const override
Definition geometry.h:253
PMDShapePoint m_bboxTopLeft
Definition geometry.h:195
bool m_isClosed
Definition geometry.h:194
PMDStrokeProperties getStrokeProperties() const override
Definition geometry.h:263
PMDShapePoint m_bboxBotRight
Definition geometry.h:196
std::vector< PMDShapePoint > getPoints() const override
Definition geometry.h:248
PMDShapePoint getXformBotRight() const override
Definition geometry.h:223
PMDFillProperties getFillProperties() const override
Definition geometry.h:258
std::string getText() const override
Definition geometry.h:268
double getSkew() const override
Definition geometry.h:212
~PMDPolygon() override
Definition geometry.h:289
PMDPolygon(std::vector< PMDShapePoint > points, bool isClosed, const PMDShapePoint &bboxTopLeft, const PMDShapePoint &bboxBotRight, const PMDXForm &xFormContainer, const PMDFillProperties fillProps, const PMDStrokeProperties strokeProps)
Definition geometry.h:202
PMDShapePoint getRotatingPoint() const override
Definition geometry.h:228
PMDShapePoint getXformTopLeft() const override
Definition geometry.h:218
std::vector< PMDCharProperties > getCharProperties() const override
Definition geometry.h:273
bool getIsClosed() const override
Definition geometry.h:243
PMDFillProperties m_fillProps
Definition geometry.h:198
PMDStrokeProperties m_strokeProps
Definition geometry.h:199
std::vector< PMDShapePoint > m_points
Definition geometry.h:193
PMDRectangle(const PMDShapePoint &bboxTopLeft, const PMDShapePoint &bboxBotRight, const PMDXForm &xFormContainer, const PMDFillProperties fillProps, const PMDStrokeProperties strokeProps)
Definition geometry.h:409
PMDShapePoint getXformBotRight() const override
Definition geometry.h:430
~PMDRectangle() override
Definition geometry.h:503
PMDXForm m_xFormContainer
Definition geometry.h:404
std::vector< PMDShapePoint > getPoints() const override
Definition geometry.h:455
librevenge::RVNGBinaryData getBitmap() const override
Definition geometry.h:497
PMDShapePoint getRotatingPoint() const override
Definition geometry.h:435
uint8_t shapeType() const override
Definition geometry.h:467
std::vector< PMDCharProperties > getCharProperties() const override
Definition geometry.h:487
PMDShapePoint m_bboxBotRight
Definition geometry.h:403
double getRotation() const override
Definition geometry.h:413
PMDFillProperties getFillProperties() const override
Definition geometry.h:472
bool getIsClosed() const override
Definition geometry.h:450
PMDShapePoint getBboxBotRight() const override
Definition geometry.h:445
PMDShapePoint getXformTopLeft() const override
Definition geometry.h:425
PMDFillProperties m_fillProps
Definition geometry.h:405
PMDStrokeProperties getStrokeProperties() const override
Definition geometry.h:477
double getSkew() const override
Definition geometry.h:419
std::string getText() const override
Definition geometry.h:482
std::vector< PMDParaProperties > getParaProperties() const override
Definition geometry.h:492
PMDStrokeProperties m_strokeProps
Definition geometry.h:406
PMDShapePoint getBboxTopLeft() const override
Definition geometry.h:440
PMDShapePoint m_bboxTopLeft
Definition geometry.h:402
PMDShapePoint getBboxTopLeft() const override
Definition geometry.h:335
PMDTextBox(const PMDShapePoint &bboxTopLeft, const PMDShapePoint &bboxBotRight, const PMDXForm &xFormContainer, std::string text, std::vector< PMDCharProperties > charProps, std::vector< PMDParaProperties > paraProps)
Definition geometry.h:304
PMDFillProperties getFillProperties() const override
Definition geometry.h:364
double getRotation() const override
Definition geometry.h:308
std::vector< PMDCharProperties > getCharProperties() const override
Definition geometry.h:379
std::vector< PMDShapePoint > getPoints() const override
Definition geometry.h:350
librevenge::RVNGBinaryData getBitmap() const override
Definition geometry.h:389
uint8_t shapeType() const override
Definition geometry.h:359
PMDShapePoint m_bboxBotRight
Definition geometry.h:297
std::vector< PMDCharProperties > m_charProps
Definition geometry.h:300
PMDShapePoint getRotatingPoint() const override
Definition geometry.h:330
std::string m_text
Definition geometry.h:299
PMDShapePoint getXformBotRight() const override
Definition geometry.h:325
PMDShapePoint getBboxBotRight() const override
Definition geometry.h:340
std::vector< PMDParaProperties > m_paraProps
Definition geometry.h:301
double getSkew() const override
Definition geometry.h:314
PMDXForm m_xFormContainer
Definition geometry.h:298
bool getIsClosed() const override
Definition geometry.h:345
PMDStrokeProperties getStrokeProperties() const override
Definition geometry.h:369
PMDShapePoint getXformTopLeft() const override
Definition geometry.h:320
PMDShapePoint m_bboxTopLeft
Definition geometry.h:296
std::string getText() const override
Definition geometry.h:374
std::vector< PMDParaProperties > getParaProperties() const override
Definition geometry.h:384
~PMDTextBox() override
Definition geometry.h:395
double m_bl
Definition geometry.h:722
double m_br
Definition geometry.h:722
InchPoint transform(const Point< Unit > &point) const
Definition geometry.h:729
double m_tr
Definition geometry.h:722
double m_tl
Definition geometry.h:722
TransformationMatrix(double bboxTopLeft, double topRight, double bottomLeft, double bottomRight)
Definition geometry.h:725
const uint8_t FILL_SOLID
Definition constants.h:62
const uint8_t SHAPE_TYPE_ELLIPSE
Definition constants.h:55
const uint8_t SHAPE_TYPE_TEXTBOX
Definition constants.h:56
const uint8_t SHAPE_TYPE_POLY
Definition constants.h:53
const uint8_t SHAPE_TYPE_LINE
Definition constants.h:52
const uint8_t SHAPE_TYPE_RECT
Definition constants.h:54
const uint8_t SHAPE_TYPE_BITMAP
Definition constants.h:57
#define M_PI
Definition libpagemaker_utils.h:26
Definition geometry.h:25
Point< double > InchPoint
Definition geometry.h:36
std::pair< InchPoint, InchPoint > getBoundingBox(const PMDLineSet &lineSet, const TransformationMatrix &matrix)
Definition geometry.cpp:15
Point< PMDShapeUnit > PMDShapePoint
Definition geometry.h:35
Definition PMDTypes.h:47
PMDFillProperties()
Definition PMDTypes.cpp:17
uint8_t m_fillType
Definition PMDTypes.h:48
Definition PMDTypes.h:57
PMDStrokeProperties()
Definition PMDTypes.cpp:25
Definition geometry.h:39
uint32_t m_rotationDegree
Definition geometry.h:40
PMDXForm(const uint32_t rotationDegree, const uint32_t skewDegree, const PMDShapePoint xformTopLeft, const PMDShapePoint xformBotRight, const PMDShapePoint rotatingPoint, const uint32_t xformId)
Definition geometry.h:47
PMDShapePoint m_rotatingPoint
Definition geometry.h:44
uint32_t m_xformId
Definition geometry.h:45
uint32_t m_skewDegree
Definition geometry.h:41
PMDShapePoint m_xformBotRight
Definition geometry.h:43
PMDShapePoint m_xformTopLeft
Definition geometry.h:42
Definition geometry.h:27
PMDShapeUnit m_y
Definition geometry.h:29
PMDShapeUnit m_x
Definition geometry.h:28
Point(Unit x, Unit y)
Definition geometry.h:31

Generated for libpagemaker by doxygen 1.18.0