Share via


CGSize Struct

Definition

Structure containing height and width values.

[System.Serializable]
public struct CGSize : IEquatable<CoreGraphics.CGSize>
[<System.Serializable>]
type CGSize = struct
Inheritance
CGSize
Attributes
Implements

Constructors

Name Description
CGSize(CGPoint)

Initializes a CGSize object from a CGPoint.

CGSize(CGSize)

Initializes a CGSize object from another CGSize.

CGSize(Double, Double)
CGSize(NFloat, NFloat)
CGSize(Single, Single)

Fields

Name Description
Empty

Represents an empty size.

Properties

Name Description
Height

The height component of the CGSize.

IsEmpty

Returns true if the size is empty

Width

The Width component of the CGSize.

Methods

Name Description
Add(CGSize, CGSize)

Adds two CGSize objects and returns the result.

Deconstruct(NFloat, NFloat)
Equals(CGSize)

Compares the size with the specified size.

Equals(Object)

Compares the CGSize with another object.

GetHashCode()
Subtract(CGSize, CGSize)
ToCGPoint()

Converts the CGSize to a CGPOint.

ToCGSizeDictionary()

Serializes a CGSize into a CGSizeDictionary.

ToDictionary()

Serializes a CGSize into an NSDictionary.

ToRoundedCGSize()
ToString()
TryParse(NSDictionary, CGSize)

Attempts to parse the contents of an NSDictionary with a serialized CGSize into a CGSize.

Operators

Name Description
Addition(CGSize, CGSize)
Equality(CGSize, CGSize)
Explicit(CGSize to CGPoint)
Explicit(CGSize to Size)
Explicit(CGSize to SizeF)
Implicit(Size to CGSize)
Implicit(SizeF to CGSize)
Inequality(CGSize, CGSize)
Subtraction(CGSize, CGSize)

Applies to