# Size struct

Namespace: [Eto.Drawing](https://eto.picoe.ca/api/namespace/eto.drawing.md) · Assembly: [Eto](https://eto.picoe.ca/api/assembly/eto.md)

```cs
[TypeConverter(SizeConverterInternal)]
public struct Size : IEquatable<Size>
```

Represents a size with width and height components

## Constructors

- [Size](https://eto.picoe.ca/api/type/eto.drawing.size/ctor.md): (4 overloads) Initializes a new Size class with an identical width and height

## Fields

- [Empty](https://eto.picoe.ca/api/type/eto.drawing.size/empty.md): (static) Gets an empty size with a zero width and height
- [MaxValue](https://eto.picoe.ca/api/type/eto.drawing.size/maxvalue.md): (static) Size with width and height with a maximum int value
- [MinValue](https://eto.picoe.ca/api/type/eto.drawing.size/minvalue.md): (static) Size with width and height with a minimum int value

## Properties

- [Height](https://eto.picoe.ca/api/type/eto.drawing.size/height.md): Gets or sets the height
- [IsEmpty](https://eto.picoe.ca/api/type/eto.drawing.size/isempty.md): Gets a value indicating that either the [Size.Width](https://eto.picoe.ca/api/type/eto.drawing.size/width.md) or [Size.Height](https://eto.picoe.ca/api/type/eto.drawing.size/height.md) are zero
- [IsZero](https://eto.picoe.ca/api/type/eto.drawing.size/iszero.md): Gets a value indicating that both the [Size.Width](https://eto.picoe.ca/api/type/eto.drawing.size/width.md) and [Size.Height](https://eto.picoe.ca/api/type/eto.drawing.size/height.md) are zero
- [Width](https://eto.picoe.ca/api/type/eto.drawing.size/width.md): Gets or sets the width

## Methods

- [Abs](https://eto.picoe.ca/api/type/eto.drawing.size/abs.md): (static) Returns the absolute width and height of the specified `size`
- [Ceiling](https://eto.picoe.ca/api/type/eto.drawing.size/ceiling.md): (static) Converts a floating point `size` to an integral size by rounding the width and height to the next integral value.
- [Contains](https://eto.picoe.ca/api/type/eto.drawing.size/contains.md): (2 overloads) Gets a value indicating that the specified `x` and `y` values are within the [Size.Width](https://eto.picoe.ca/api/type/eto.drawing.size/width.md) and [Size.Height](https://eto.picoe.ca/api/type/eto.drawing.size/height.md) of this size
- [Equals](https://eto.picoe.ca/api/type/eto.drawing.size/equals.md): (2 overloads) Compares this size to the specified `obj`
- [FitTo](https://eto.picoe.ca/api/type/eto.drawing.size/fitto.md): Fits this size to the specified `constraint`, keeping the aspect
- [GetHashCode](https://eto.picoe.ca/api/type/eto.drawing.size/gethashcode.md): Gets the hash code for this Size
- [Max](https://eto.picoe.ca/api/type/eto.drawing.size/max.md): (static) Returns the maximum width and height of two sizes
- [Min](https://eto.picoe.ca/api/type/eto.drawing.size/min.md): (static) Returns the minimum width and height of two sizes
- [Round](https://eto.picoe.ca/api/type/eto.drawing.size/round.md): (static) Converts a floating point `size` to an integral size by rounding the width and height
- [ToString](https://eto.picoe.ca/api/type/eto.drawing.size/tostring.md): Converts this Size struct to a string
- [Truncate](https://eto.picoe.ca/api/type/eto.drawing.size/truncate.md): (static) Converts a floating point `size` to an integral size by truncating the width and height

## Operators

- [operator +](https://eto.picoe.ca/api/type/eto.drawing.size/op-addition.md): (3 overloads, static) Adds a `value` to the [Size.Width](https://eto.picoe.ca/api/type/eto.drawing.size/width.md) and [Size.Height](https://eto.picoe.ca/api/type/eto.drawing.size/height.md) of the specified `size`
- [operator /](https://eto.picoe.ca/api/type/eto.drawing.size/op-division.md): (2 overloads, static) Divides the [Size.Width](https://eto.picoe.ca/api/type/eto.drawing.size/width.md) and [Size.Height](https://eto.picoe.ca/api/type/eto.drawing.size/height.md) of a `size` by the specified `factor`
- [operator ==](https://eto.picoe.ca/api/type/eto.drawing.size/op-equality.md): (static) Compares two sizes for equality
- [operator !=](https://eto.picoe.ca/api/type/eto.drawing.size/op-inequality.md): (static) Compares two sizes for inequality
- [operator *](https://eto.picoe.ca/api/type/eto.drawing.size/op-multiply.md): (4 overloads, static) Multiplies the [Size.Width](https://eto.picoe.ca/api/type/eto.drawing.size/width.md) and [Size.Height](https://eto.picoe.ca/api/type/eto.drawing.size/height.md) of a `size` by the specified `factor`
- [operator -](https://eto.picoe.ca/api/type/eto.drawing.size/op-subtraction.md): (3 overloads, static) Subtracts a `value` from the [Size.Width](https://eto.picoe.ca/api/type/eto.drawing.size/width.md) and [Size.Height](https://eto.picoe.ca/api/type/eto.drawing.size/height.md) of the specified `size`
- [operator -](https://eto.picoe.ca/api/type/eto.drawing.size/op-unarynegation.md): (static) Negates the Width and Height of the specified `size` value

## Convertors

- [operator explicit](https://eto.picoe.ca/api/type/eto.drawing.size/op-explicit.md): (2 overloads, static) Explicit conversion from a `point` to a Size with a Width and Height of the X and Y values of the point, respectively
