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

Generated for libpagemaker by doxygen 1.8.13