xtd - Reference Guide  0.1.0 Modern c++17 framework to create console, gui and unit test applications on Windows, macOS and Linux.
xtd::drawing::size Class Reference

Stores an ordered pair of integers, which specify a height and width. More...

#include <size.h>

## Public Member Functions

size ()=default
Initializes a new instance of the Size class that has a Height and Width value of 0. More...

size (const xtd::drawing::point &point)
IInitializes a new instance of the Size class from the specified Point class. More...

size (int32_t width, int32_t height)
Initializes a new instance of the Size class from the specified dimensions. More...

int32_t height () const
Gets he vertical component of this Size Class. More...

void height (int32_t height)
Sets the vertical component of this Size Class. More...

bool is_empty () const
Tests whether this Size class has width and height of 0. More...

std::string to_string () const
Creates a human-readable string that represents this size class. More...

int32_t width () const
Gets the horizontal component of this Size class. More...

void width (int32_t width)
Sets the horizontal component of this Size class. More...

## Static Public Member Functions

static size add (const size &size1, const size &size2)
Adds the width and height of one Size class to the width and height of another size class. More...

static size ceiling (const size_f &value)
Converts the specified size_f to a size by rounding the values of the size_f to the next higher integer values. More...

static size round (const size_f &value)
Converts the specified size_f to a size object by rounding the size_f values to the nearest integer. More...

static xtd::drawing::size subtract (const xtd::drawing::size &sz1, const xtd::drawing::size &sz2)
Returns the result of subtracting specified size from the specified size. More...

static size truncate (const size_f &value)
Converts the specified size_f to a size by truncating the values of the size_f. More...

## Static Public Attributes

static const xtd::drawing::size empty
Gets a Size class that has a Height and Width value of 0. This field is constant. More...

## Detailed Description

Stores an ordered pair of integers, which specify a height and width.

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