A library for working with phylogenetic and population genetic data.
v0.32.0
shapes.hpp
Go to the documentation of this file.
1 #ifndef GENESIS_UTILS_FORMATS_SVG_SHAPES_H_
2 #define GENESIS_UTILS_FORMATS_SVG_SHAPES_H_
3 
4 /*
5  Genesis - A toolkit for working with phylogenetic data.
6  Copyright (C) 2014-2022 Lucas Czech
7 
8  This program is free software: you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation, either version 3 of the License, or
11  (at your option) any later version.
12 
13  This program is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program. If not, see <http://www.gnu.org/licenses/>.
20 
21  Contact:
22  Lucas Czech <lczech@carnegiescience.edu>
23  Department of Plant Biology, Carnegie Institution For Science
24  260 Panama Street, Stanford, CA 94305, USA
25 */
26 
37 
38 #include <iosfwd>
39 #include <stdexcept>
40 #include <string>
41 #include <vector>
42 
43 namespace genesis {
44 namespace utils {
45 
46 // =================================================================================================
47 // Svg Line
48 // =================================================================================================
49 
50 struct SvgLine
51 {
52 public:
53 
54  // -------------------------------------------------------------
55  // Typedefs and Enums
56  // -------------------------------------------------------------
57 
58  using self_type = SvgLine;
59 
60  // -------------------------------------------------------------
61  // Constructors and Rule of Five
62  // -------------------------------------------------------------
63 
64  SvgLine(
65  SvgPoint const& point_1,
66  SvgPoint const& point_2,
67  SvgStroke const& stroke = SvgStroke()
68  );
69 
70  SvgLine(
71  double x1, double y1,
72  double x2, double y2,
73  SvgStroke const& stroke = SvgStroke()
74  );
75 
76  ~SvgLine() = default;
77 
78  SvgLine( SvgLine const& ) = default;
79  SvgLine( SvgLine&& ) = default;
80 
81  SvgLine& operator= ( SvgLine const& ) = default;
82  SvgLine& operator= ( SvgLine&& ) = default;
83 
84  // -------------------------------------------------------------
85  // Drawing Function
86  // -------------------------------------------------------------
87 
88  SvgBox bounding_box() const;
89 
90  void write(
91  std::ostream& out,
92  size_t indent = 0,
93  SvgDrawingOptions const& options = SvgDrawingOptions()
94  ) const;
95 
96  // -------------------------------------------------------------
97  // Properties
98  // -------------------------------------------------------------
99 
100  std::string id;
105 
106 };
107 
108 // =================================================================================================
109 // Svg Rect
110 // =================================================================================================
111 
112 struct SvgRect
113 {
114 public:
115 
116  // -------------------------------------------------------------
117  // Typedefs and Enums
118  // -------------------------------------------------------------
119 
121 
122  // -------------------------------------------------------------
123  // Constructors and Rule of Five
124  // -------------------------------------------------------------
125 
126  SvgRect(
127  SvgPoint const& position,
128  SvgSize const& size,
129  SvgStroke const& stroke = SvgStroke(),
130  SvgFill const& fill = SvgFill()
131  );
132 
133  SvgRect(
134  double x, double y,
135  double w, double h,
136  SvgStroke const& stroke = SvgStroke(),
137  SvgFill const& fill = SvgFill()
138  );
139 
140  ~SvgRect() = default;
141 
142  SvgRect( SvgRect const& ) = default;
143  SvgRect( SvgRect&& ) = default;
144 
145  SvgRect& operator= ( SvgRect const& ) = default;
146  SvgRect& operator= ( SvgRect&& ) = default;
147 
148  // -------------------------------------------------------------
149  // Drawing Function
150  // -------------------------------------------------------------
151 
152  SvgBox bounding_box() const;
153 
154  void write(
155  std::ostream& out,
156  size_t indent = 0,
157  SvgDrawingOptions const& options = SvgDrawingOptions()
158  ) const;
159 
160  // -------------------------------------------------------------
161  // Properties
162  // -------------------------------------------------------------
163 
164  std::string id;
165 
168 
171 
172  double rx;
173  double ry;
174 
176 
177 };
178 
179 // =================================================================================================
180 // Svg Circle
181 // =================================================================================================
182 
183 struct SvgCircle
184 {
185 public:
186 
187  // -------------------------------------------------------------
188  // Typedefs and Enums
189  // -------------------------------------------------------------
190 
192 
193  // -------------------------------------------------------------
194  // Constructors and Rule of Five
195  // -------------------------------------------------------------
196 
197  SvgCircle(
198  SvgPoint const& center,
199  double radius,
200  SvgStroke const& stroke = SvgStroke(),
201  SvgFill const& fill = SvgFill()
202  );
203 
204  SvgCircle(
205  double cx, double cy,
206  double radius,
207  SvgStroke const& stroke = SvgStroke(),
208  SvgFill const& fill = SvgFill()
209  );
210 
211  ~SvgCircle() = default;
212 
213  SvgCircle( SvgCircle const& ) = default;
214  SvgCircle( SvgCircle&& ) = default;
215 
216  SvgCircle& operator= ( SvgCircle const& ) = default;
217  SvgCircle& operator= ( SvgCircle&& ) = default;
218 
219  // -------------------------------------------------------------
220  // Drawing Function
221  // -------------------------------------------------------------
222 
223  SvgBox bounding_box() const;
224 
225  void write(
226  std::ostream& out,
227  size_t indent = 0,
228  SvgDrawingOptions const& options = SvgDrawingOptions()
229  ) const;
230 
231  // -------------------------------------------------------------
232  // Properties
233  // -------------------------------------------------------------
234 
235  std::string id;
236 
238  double radius;
239 
242 
244 
245 };
246 
247 // =================================================================================================
248 // Svg Ellipse
249 // =================================================================================================
250 
252 {
253 public:
254 
255  // -------------------------------------------------------------
256  // Typedefs and Enums
257  // -------------------------------------------------------------
258 
260 
261  // -------------------------------------------------------------
262  // Constructors and Rule of Five
263  // -------------------------------------------------------------
264 
265  SvgEllipse(
266  SvgPoint const& center,
267  double rx, double ry,
268  SvgStroke const& stroke = SvgStroke(),
269  SvgFill const& fill = SvgFill()
270  );
271 
272  SvgEllipse(
273  double cx, double cy,
274  double rx, double ry,
275  SvgStroke const& stroke = SvgStroke(),
276  SvgFill const& fill = SvgFill()
277  );
278 
279  ~SvgEllipse() = default;
280 
281  SvgEllipse( SvgEllipse const& ) = default;
282  SvgEllipse( SvgEllipse&& ) = default;
283 
284  SvgEllipse& operator= ( SvgEllipse const& ) = default;
285  SvgEllipse& operator= ( SvgEllipse&& ) = default;
286 
287  // -------------------------------------------------------------
288  // Drawing Function
289  // -------------------------------------------------------------
290 
291  SvgBox bounding_box() const;
292 
293  void write(
294  std::ostream& out,
295  size_t indent = 0,
296  SvgDrawingOptions const& options = SvgDrawingOptions()
297  ) const;
298 
299  // -------------------------------------------------------------
300  // Properties
301  // -------------------------------------------------------------
302 
303  std::string id;
304 
306  double rx;
307  double ry;
308 
311 
313 
314 };
315 
316 // =================================================================================================
317 // Svg Polyline
318 // =================================================================================================
319 
321 {
322 public:
323 
324  // -------------------------------------------------------------
325  // Typedefs and Enums
326  // -------------------------------------------------------------
327 
329 
330  // -------------------------------------------------------------
331  // Constructors and Rule of Five
332  // -------------------------------------------------------------
333 
334  SvgPolyline(
335  SvgStroke const& stroke = SvgStroke(),
336  SvgFill const& fill = SvgFill()
337  );
338 
339  SvgPolyline(
340  std::vector< SvgPoint > points,
341  SvgStroke const& stroke = SvgStroke(),
342  SvgFill const& fill = SvgFill()
343  );
344 
345  ~SvgPolyline() = default;
346 
347  SvgPolyline( SvgPolyline const& ) = default;
348  SvgPolyline( SvgPolyline&& ) = default;
349 
350  SvgPolyline& operator= ( SvgPolyline const& ) = default;
351  SvgPolyline& operator= ( SvgPolyline&& ) = default;
352 
353  // -------------------------------------------------------------
354  // Drawing Function
355  // -------------------------------------------------------------
356 
357  self_type& add( double x, double y );
358  self_type& add( SvgPoint p );
359 
361 
362  SvgBox bounding_box() const;
363 
364  void write(
365  std::ostream& out,
366  size_t indent = 0,
367  SvgDrawingOptions const& options = SvgDrawingOptions()
368  ) const;
369 
370  // -------------------------------------------------------------
371  // Properties
372  // -------------------------------------------------------------
373 
374  std::string id;
375 
376  std::vector< SvgPoint > points;
377 
380 
382 
383 };
384 
385 // =================================================================================================
386 // Svg Polygon
387 // =================================================================================================
388 
390 {
391 public:
392 
393  // -------------------------------------------------------------
394  // Typedefs and Enums
395  // -------------------------------------------------------------
396 
398 
399  // -------------------------------------------------------------
400  // Constructors and Rule of Five
401  // -------------------------------------------------------------
402 
403  SvgPolygon(
404  SvgStroke const& stroke = SvgStroke(),
405  SvgFill const& fill = SvgFill()
406  );
407 
408  SvgPolygon(
409  std::vector< SvgPoint > const& points,
410  SvgStroke const& stroke = SvgStroke(),
411  SvgFill const& fill = SvgFill()
412  );
413 
414  ~SvgPolygon() = default;
415 
416  SvgPolygon( SvgPolygon const& ) = default;
417  SvgPolygon( SvgPolygon&& ) = default;
418 
419  SvgPolygon& operator= ( SvgPolygon const& ) = default;
420  SvgPolygon& operator= ( SvgPolygon&& ) = default;
421 
422  // -------------------------------------------------------------
423  // Drawing Function
424  // -------------------------------------------------------------
425 
426  self_type& add( double x, double y );
427  self_type& add( SvgPoint p );
428 
430 
431  SvgBox bounding_box() const;
432 
433  void write(
434  std::ostream& out,
435  size_t indent = 0,
436  SvgDrawingOptions const& options = SvgDrawingOptions()
437  ) const;
438 
439  // -------------------------------------------------------------
440  // Properties
441  // -------------------------------------------------------------
442 
443  std::string id;
444 
445  std::vector< SvgPoint > points;
446 
449 
451 
452 };
453 
454 // =================================================================================================
455 // Svg Path
456 // =================================================================================================
457 
458 struct SvgPath
459 {
460 public:
461 
462  // -------------------------------------------------------------
463  // Typedefs and Enums
464  // -------------------------------------------------------------
465 
467 
468  // -------------------------------------------------------------
469  // Constructors and Rule of Five
470  // -------------------------------------------------------------
471 
472  SvgPath(
473  SvgStroke const& stroke = SvgStroke(),
474  SvgFill const& fill = SvgFill()
475  );
476 
477  SvgPath(
478  std::vector< std::string > const& elements,
479  SvgStroke const& stroke = SvgStroke(),
480  SvgFill const& fill = SvgFill()
481  );
482 
483  ~SvgPath() = default;
484 
485  SvgPath( SvgPath const& ) = default;
486  SvgPath( SvgPath&& ) = default;
487 
488  SvgPath& operator= ( SvgPath const& ) = default;
489  SvgPath& operator= ( SvgPath&& ) = default;
490 
491  // -------------------------------------------------------------
492  // Drawing Function
493  // -------------------------------------------------------------
494 
495  self_type& add( std::string elem );
496 
497  self_type& operator <<( std::string elem );
498 
507  SvgBox bounding_box() const;
508 
509  void write(
510  std::ostream& out,
511  size_t indent = 0,
512  SvgDrawingOptions const& options = SvgDrawingOptions()
513  ) const;
514 
515  // -------------------------------------------------------------
516  // Properties
517  // -------------------------------------------------------------
518 
519  std::string id;
520 
521  std::vector< std::string > elements;
522 
525 
527 
528 };
529 
530 // =================================================================================================
531 // Svg Use
532 // =================================================================================================
533 
534 struct SvgUse
535 {
536 public:
537 
538  // -------------------------------------------------------------
539  // Typedefs and Enums
540  // -------------------------------------------------------------
541 
542  using self_type = SvgUse;
543 
544  // -------------------------------------------------------------
545  // Constructors and Rule of Five
546  // -------------------------------------------------------------
547 
549  SvgObject const& other
550  )
551  : SvgUse( other, 0.0, 0.0 )
552  {}
553 
555  SvgObject const& other,
556  SvgPoint const& offset
557  )
558  : SvgUse( other, offset.x, offset.y )
559  {}
560 
562  SvgObject const& other,
563  double offset_x,
564  double offset_y
565  )
566  : object( &other )
567  , offset( offset_x, offset_y )
568  {
569  if( other.id().empty() ) {
570  throw std::runtime_error(
571  "Cannot create an SvgUse object using an SvgObject with an empty id attribute."
572  );
573  }
574  }
575 
576  ~SvgUse() = default;
577 
578  SvgUse( SvgUse const& ) = default;
579  SvgUse( SvgUse&& ) = default;
580 
581  SvgUse& operator= ( SvgUse const& ) = default;
582  SvgUse& operator= ( SvgUse&& ) = default;
583 
584  // -------------------------------------------------------------
585  // Drawing Function
586  // -------------------------------------------------------------
587 
588  SvgBox bounding_box() const;
589 
590  void write(
591  std::ostream& out,
592  size_t indent = 0,
593  SvgDrawingOptions const& options = SvgDrawingOptions()
594  ) const;
595 
596  // -------------------------------------------------------------
597  // Properties
598  // -------------------------------------------------------------
599 
600  std::string id;
601 
603  // std::string referenced_id;
604 
607 
608 };
609 
610 } // namespace utils
611 } // namespace genesis
612 
613 #endif // include guard
genesis::utils::SvgPolygon::bounding_box
SvgBox bounding_box() const
Definition: shapes.cpp:421
genesis::utils::SvgRect::stroke
SvgStroke stroke
Definition: shapes.hpp:169
genesis::utils::SvgLine::id
std::string id
Definition: shapes.hpp:100
genesis::utils::SvgEllipse::center
SvgPoint center
Definition: shapes.hpp:305
genesis::utils::SvgUse::SvgUse
SvgUse(SvgObject const &other, SvgPoint const &offset)
Definition: shapes.hpp:554
genesis::utils::SvgPolygon::~SvgPolygon
~SvgPolygon()=default
genesis::utils::SvgPolygon::points
std::vector< SvgPoint > points
Definition: shapes.hpp:445
genesis::utils::SvgCircle::radius
double radius
Definition: shapes.hpp:238
genesis::utils::SvgEllipse
Definition: shapes.hpp:251
helper.hpp
genesis::utils::SvgRect::size
SvgSize size
Definition: shapes.hpp:167
genesis::utils::SvgPath::elements
std::vector< std::string > elements
Definition: shapes.hpp:521
genesis::utils::SvgPolyline::id
std::string id
Definition: shapes.hpp:374
genesis::utils::SvgRect::rx
double rx
Definition: shapes.hpp:172
genesis::utils::indent
std::string indent(std::string const &text, std::string const &indentation)
Indent each line of text with indentation and return the result.
Definition: string.cpp:719
genesis::utils::SvgCircle::stroke
SvgStroke stroke
Definition: shapes.hpp:240
genesis::utils::SvgRect::~SvgRect
~SvgRect()=default
genesis::utils::SvgPath::stroke
SvgStroke stroke
Definition: shapes.hpp:523
genesis::utils::SvgCircle::transform
SvgTransform transform
Definition: shapes.hpp:243
genesis::utils::SvgEllipse::SvgEllipse
SvgEllipse(SvgPoint const &center, double rx, double ry, SvgStroke const &stroke=SvgStroke(), SvgFill const &fill=SvgFill())
Definition: shapes.cpp:244
genesis::utils::SvgRect::operator=
SvgRect & operator=(SvgRect const &)=default
genesis::utils::SvgPath::operator<<
self_type & operator<<(std::string elem)
Definition: shapes.cpp:487
genesis::utils::SvgEllipse::transform
SvgTransform transform
Definition: shapes.hpp:312
genesis::utils::SvgPath::write
void write(std::ostream &out, size_t indent=0, SvgDrawingOptions const &options=SvgDrawingOptions()) const
Definition: shapes.cpp:691
genesis::utils::SvgPolyline::fill
SvgFill fill
Definition: shapes.hpp:379
genesis::utils::SvgCircle::id
std::string id
Definition: shapes.hpp:235
genesis::utils::SvgPolyline
Definition: shapes.hpp:320
genesis::utils::SvgPolyline::operator<<
self_type & operator<<(SvgPoint p)
Definition: shapes.cpp:340
genesis::utils::SvgPath
Definition: shapes.hpp:458
genesis::utils::SvgPolyline::transform
SvgTransform transform
Definition: shapes.hpp:381
genesis::utils::SvgCircle::write
void write(std::ostream &out, size_t indent=0, SvgDrawingOptions const &options=SvgDrawingOptions()) const
Definition: shapes.cpp:217
genesis::utils::SvgPolygon::stroke
SvgStroke stroke
Definition: shapes.hpp:447
genesis::utils::SvgObject::id
std::string const & id() const
Definition: object.hpp:88
genesis::utils::SvgLine
Definition: shapes.hpp:50
genesis::utils::SvgUse::transform
SvgTransform transform
Definition: shapes.hpp:606
genesis::utils::SvgLine::~SvgLine
~SvgLine()=default
genesis::utils::SvgEllipse::~SvgEllipse
~SvgEllipse()=default
genesis::utils::SvgRect::bounding_box
SvgBox bounding_box() const
Definition: shapes.cpp:144
genesis::utils::SvgBox
Definition: utils/formats/svg/helper.hpp:127
genesis::utils::SvgCircle
Definition: shapes.hpp:183
genesis::utils::SvgLine::write
void write(std::ostream &out, size_t indent=0, SvgDrawingOptions const &options=SvgDrawingOptions()) const
Definition: shapes.cpp:90
genesis::utils::SvgPolyline::add
self_type & add(double x, double y)
Definition: shapes.cpp:329
genesis::utils::SvgLine::bounding_box
SvgBox bounding_box() const
Definition: shapes.cpp:71
genesis::utils::SvgPolyline::bounding_box
SvgBox bounding_box() const
Definition: shapes.cpp:345
genesis::utils::SvgPath::bounding_box
SvgBox bounding_box() const
Compute the bounding box of the path.
Definition: shapes.cpp:492
genesis::utils::SvgPolygon::add
self_type & add(double x, double y)
Definition: shapes.cpp:405
genesis::utils::SvgEllipse::ry
double ry
Definition: shapes.hpp:307
genesis::utils::SvgCircle::center
SvgPoint center
Definition: shapes.hpp:237
genesis::utils::SvgPoint
Definition: utils/formats/svg/helper.hpp:57
genesis::utils::SvgPolyline::operator=
SvgPolyline & operator=(SvgPolyline const &)=default
genesis::utils::SvgStroke
Definition: attributes.hpp:49
genesis::utils::SvgLine::operator=
SvgLine & operator=(SvgLine const &)=default
genesis::utils::SvgRect
Definition: shapes.hpp:112
genesis::utils::SvgLine::transform
SvgTransform transform
Definition: shapes.hpp:104
genesis::utils::SvgLine::SvgLine
SvgLine(SvgPoint const &point_1, SvgPoint const &point_2, SvgStroke const &stroke=SvgStroke())
Definition: shapes.cpp:57
genesis::utils::SvgUse::object
SvgObject const * object
Definition: shapes.hpp:602
genesis::utils::SvgPolygon::id
std::string id
Definition: shapes.hpp:443
genesis::utils::SvgPolyline::points
std::vector< SvgPoint > points
Definition: shapes.hpp:376
genesis::utils::SvgPolygon
Definition: shapes.hpp:389
genesis::utils::SvgLine::stroke
SvgStroke stroke
Definition: shapes.hpp:103
genesis::utils::SvgUse::bounding_box
SvgBox bounding_box() const
Definition: shapes.cpp:721
genesis::utils::SvgEllipse::fill
SvgFill fill
Definition: shapes.hpp:310
genesis::utils::SvgPolyline::SvgPolyline
SvgPolyline(SvgStroke const &stroke=SvgStroke(), SvgFill const &fill=SvgFill())
Definition: shapes.cpp:307
genesis::utils::SvgRect::ry
double ry
Definition: shapes.hpp:173
genesis::utils::SvgPolygon::operator=
SvgPolygon & operator=(SvgPolygon const &)=default
genesis::utils::SvgRect::fill
SvgFill fill
Definition: shapes.hpp:170
genesis::utils::SvgUse::write
void write(std::ostream &out, size_t indent=0, SvgDrawingOptions const &options=SvgDrawingOptions()) const
Definition: shapes.cpp:736
genesis::utils::SvgRect::write
void write(std::ostream &out, size_t indent=0, SvgDrawingOptions const &options=SvgDrawingOptions()) const
Definition: shapes.cpp:149
genesis::utils::SvgPolygon::fill
SvgFill fill
Definition: shapes.hpp:448
genesis::utils::SvgCircle::fill
SvgFill fill
Definition: shapes.hpp:241
genesis
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
Definition: placement/formats/edge_color.cpp:42
genesis::utils::SvgUse::SvgUse
SvgUse(SvgObject const &other, double offset_x, double offset_y)
Definition: shapes.hpp:561
genesis::utils::SvgUse::SvgUse
SvgUse(SvgObject const &other)
Definition: shapes.hpp:548
genesis::utils::SvgPolygon::SvgPolygon
SvgPolygon(SvgStroke const &stroke=SvgStroke(), SvgFill const &fill=SvgFill())
Definition: shapes.cpp:383
genesis::utils::SvgCircle::operator=
SvgCircle & operator=(SvgCircle const &)=default
genesis::utils::SvgFill
Definition: attributes.hpp:131
genesis::utils::SvgEllipse::operator=
SvgEllipse & operator=(SvgEllipse const &)=default
genesis::utils::SvgPath::SvgPath
SvgPath(SvgStroke const &stroke=SvgStroke(), SvgFill const &fill=SvgFill())
Definition: shapes.cpp:459
genesis::utils::SvgPath::~SvgPath
~SvgPath()=default
genesis::utils::SvgTransform
Definition: attributes.hpp:238
genesis::utils::SvgEllipse::bounding_box
SvgBox bounding_box() const
Definition: shapes.cpp:270
genesis::utils::SvgCircle::bounding_box
SvgBox bounding_box() const
Definition: shapes.cpp:207
genesis::utils::SvgRect::id
std::string id
Definition: shapes.hpp:164
genesis::utils::SvgRect::SvgRect
SvgRect(SvgPoint const &position, SvgSize const &size, SvgStroke const &stroke=SvgStroke(), SvgFill const &fill=SvgFill())
Definition: shapes.cpp:117
genesis::utils::SvgEllipse::id
std::string id
Definition: shapes.hpp:303
genesis::utils::SvgSize
Definition: utils/formats/svg/helper.hpp:77
genesis::utils::SvgCircle::SvgCircle
SvgCircle(SvgPoint const &center, double radius, SvgStroke const &stroke=SvgStroke(), SvgFill const &fill=SvgFill())
Definition: shapes.cpp:182
genesis::utils::SvgPath::add
self_type & add(std::string elem)
Definition: shapes.cpp:481
genesis::utils::SvgPath::fill
SvgFill fill
Definition: shapes.hpp:524
genesis::utils::SvgPolygon::write
void write(std::ostream &out, size_t indent=0, SvgDrawingOptions const &options=SvgDrawingOptions()) const
Definition: shapes.cpp:426
genesis::utils::SvgPolygon::operator<<
self_type & operator<<(SvgPoint p)
Definition: shapes.cpp:416
genesis::utils::SvgPath::operator=
SvgPath & operator=(SvgPath const &)=default
genesis::utils::SvgLine::point_2
SvgPoint point_2
Definition: shapes.hpp:102
genesis::utils::SvgPath::id
std::string id
Definition: shapes.hpp:519
genesis::utils::SvgPath::transform
SvgTransform transform
Definition: shapes.hpp:526
genesis::utils::SvgEllipse::stroke
SvgStroke stroke
Definition: shapes.hpp:309
attributes.hpp
genesis::utils::SvgUse::operator=
SvgUse & operator=(SvgUse const &)=default
genesis::utils::SvgLine::point_1
SvgPoint point_1
Definition: shapes.hpp:101
genesis::utils::SvgEllipse::write
void write(std::ostream &out, size_t indent=0, SvgDrawingOptions const &options=SvgDrawingOptions()) const
Definition: shapes.cpp:279
genesis::utils::SvgPolygon::transform
SvgTransform transform
Definition: shapes.hpp:450
genesis::utils::SvgCircle::~SvgCircle
~SvgCircle()=default
genesis::utils::SvgRect::transform
SvgTransform transform
Definition: shapes.hpp:175
genesis::utils::SvgDrawingOptions
Definition: utils/formats/svg/helper.hpp:213
genesis::utils::SvgRect::position
SvgPoint position
Definition: shapes.hpp:166
genesis::utils::SvgObject
Definition: object.hpp:46
object.hpp
genesis::utils::SvgUse
Definition: shapes.hpp:534
genesis::utils::SvgEllipse::rx
double rx
Definition: shapes.hpp:306
genesis::utils::SvgPolyline::write
void write(std::ostream &out, size_t indent=0, SvgDrawingOptions const &options=SvgDrawingOptions()) const
Definition: shapes.cpp:350
genesis::utils::SvgPolyline::~SvgPolyline
~SvgPolyline()=default
genesis::utils::SvgUse::id
std::string id
Definition: shapes.hpp:600
genesis::utils::SvgUse::~SvgUse
~SvgUse()=default
genesis::utils::SvgUse::offset
SvgPoint offset
Definition: shapes.hpp:605
genesis::utils::SvgPolyline::stroke
SvgStroke stroke
Definition: shapes.hpp:378