NovaSVG 0.10.0
A header-only SVG library
Loading...
Searching...
No Matches
novasvg::Size Class Reference

#include <canvas.h>

Public Member Functions

constexpr Size ()=default
 
constexpr Size (float w, float h)
 
constexpr void expand (float dw, float dh)
 
constexpr void expand (float d)
 
constexpr void expand (const Size &s)
 
constexpr void scale (float sw, float sh)
 
constexpr void scale (float s)
 
constexpr bool isEmpty () const
 
constexpr bool isZero () const
 
constexpr bool isValid () const
 

Public Attributes

float w {0}
 
float h {0}
 

Detailed Description

Definition at line 113 of file canvas.h.

Constructor & Destructor Documentation

◆ Size() [1/2]

constexpr novasvg::Size::Size ( )
constexprdefault

◆ Size() [2/2]

constexpr novasvg::Size::Size ( float  w,
float  h 
)
inlineconstexpr

Definition at line 116 of file canvas.h.

Member Function Documentation

◆ expand() [1/3]

constexpr void novasvg::Size::expand ( const Size &  s)
inlineconstexpr

Definition at line 120 of file canvas.h.

References expand(), h, and w.

Referenced by expand().

◆ expand() [2/3]

constexpr void novasvg::Size::expand ( float  d)
inlineconstexpr

Definition at line 119 of file canvas.h.

References expand().

Referenced by expand().

◆ expand() [3/3]

constexpr void novasvg::Size::expand ( float  dw,
float  dh 
)
inlineconstexpr

Definition at line 118 of file canvas.h.

References h, and w.

Referenced by novasvg::operator+=(), and novasvg::operator-=().

◆ isEmpty()

constexpr bool novasvg::Size::isEmpty ( ) const
inlineconstexpr

◆ isValid()

constexpr bool novasvg::Size::isValid ( ) const
inlineconstexpr

Definition at line 127 of file canvas.h.

References h, and w.

◆ isZero()

constexpr bool novasvg::Size::isZero ( ) const
inlineconstexpr

Definition at line 126 of file canvas.h.

References h, and w.

◆ scale() [1/2]

constexpr void novasvg::Size::scale ( float  s)
inlineconstexpr

Definition at line 123 of file canvas.h.

References scale().

Referenced by scale().

◆ scale() [2/2]

constexpr void novasvg::Size::scale ( float  sw,
float  sh 
)
inlineconstexpr

Definition at line 122 of file canvas.h.

References h, and w.

Member Data Documentation

◆ h

◆ w


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