Size

public struct Size : Hashable

A structure that contains width and height values.

  • A width value.

    Declaration

    Swift

    public var width: Float
  • A height value.

    Declaration

    Swift

    public var height: Float
  • Creates a size with dimensions specified as floating-point values.

    Declaration

    Swift

    @inlinable
    public init(width: Float, height: Float)

    Parameters

    width

    A width value.

    height

    A height value.

  • Creates a size with dimensions specified as integer values.

    Declaration

    Swift

    @inlinable
    public init(width: Int, height: Int)

    Parameters

    width

    A width value.

    height

    A height value.

  • Returns the height and width resulting from a transformation of an existing height and width.

    Declaration

    Swift

    @inlinable
    public func applying(_ transform: AffineTransform) -> Size

    Parameters

    transform

    The affine transform to apply.

    Return Value

    A new size resulting from applying the specified affine transform to the existing size.

  • Declaration

    Swift

    public var debugDescription: String { get }