izzi
SVG SUBSET C++ API
Loading...
Searching...
No Matches
svg::area< T1 > Struct Template Reference

#include <a60-svg-base-types.h>

+ Inheritance diagram for svg::area< T1 >:

Public Types

using atype = T1
 
using unit = svg::unit
 

Public Member Functions

constexpr point_2t center_point () const
 Convenience function for finding center.
 
constexpr double max_segment_size_n (const uint rdenom=2) const
 Given.
 
area to_landscape () const
 Landscape, aka largest side is horizontal.
 
area to_portrait () const
 Portrait, aka largest side is vertical.
 

Public Attributes

atype _M_height
 
atype _M_width
 

Detailed Description

template<typename T1 = svg::space_type>
struct svg::area< T1 >

Area/Page/Canvas/Drawing area description. Size, origin location in 2D (x,y), heigh, width

ANSI Letter mm == (unit::millimeter, 215.9, 279.4); ANSI Letter pixels == (unit::pixel, 765, 990);

ISO A4 mm == (unit::millimeter, 210, 297); ISO A4 pixels == (unit::pixel, 744.09, 1052.36);

720p pixels == (unit::pixel, 1280, 720); 1080p pixels == (unit::pixel, 1920, 1080);

SVG coordinate system is (0,0) is top leftmost.

Definition at line 81 of file a60-svg-base-types.h.

Member Typedef Documentation

◆ atype

template<typename T1 = svg::space_type>
using svg::area< T1 >::atype = T1

Definition at line 83 of file a60-svg-base-types.h.

◆ unit

template<typename T1 = svg::space_type>
using svg::area< T1 >::unit = svg::unit

Definition at line 84 of file a60-svg-base-types.h.

Member Function Documentation

◆ center_point()

template<typename T1 = svg::space_type>
point_2t svg::area< T1 >::center_point ( ) const
inlineconstexpr

Convenience function for finding center.

Definition at line 102 of file a60-svg-base-types.h.

◆ max_segment_size_n()

template<typename T1 = svg::space_type>
double svg::area< T1 >::max_segment_size_n ( const uint rdenom = 2) const
inlineconstexpr

Given.

Parameters
rdenomscaling factor and SVG canvas area by @obj, compute max effective segment size given number of segments @rdenom. NB: if rdenom is two then this is a max radius value centered on the page/frame.

Definition at line 94 of file a60-svg-base-types.h.

◆ to_landscape()

template<typename T1 = svg::space_type>
area svg::area< T1 >::to_landscape ( ) const
inline

Landscape, aka largest side is horizontal.

Definition at line 107 of file a60-svg-base-types.h.

◆ to_portrait()

template<typename T1 = svg::space_type>
area svg::area< T1 >::to_portrait ( ) const
inline

Portrait, aka largest side is vertical.

Definition at line 127 of file a60-svg-base-types.h.

Member Data Documentation

◆ _M_height

template<typename T1 = svg::space_type>
atype svg::area< T1 >::_M_height

Definition at line 87 of file a60-svg-base-types.h.

◆ _M_width

template<typename T1 = svg::space_type>
atype svg::area< T1 >::_M_width

Definition at line 86 of file a60-svg-base-types.h.


The documentation for this struct was generated from the following file: