Dynamic Icons Scripting Reference - v1.3.0
    Preparing search index...

    Class Size

    The Size class represents an object with width and height properties. Convenience properties and methods are provided for various operations. It also provides static methods for working with any SizeType object (anything with width and height properties).

    Implements

    Index

    Accessors

    • get isEmpty(): boolean

      Returns true if either of the width or height are less than or equal to zero.

      Returns boolean

    • get isNull(): boolean

      Returns true if both width and height values are zero.

      Returns boolean

    • get fuzzyIsNull(): boolean

      Returns true if both width and height values are equal to zero to within 4 decimal places of precision.

      Returns boolean

    Constructors

    • Parameters

      • OptionalwidthOrSize: number | SizeType | Size
      • Optionalheight: number

      Returns Size

    Methods

    • Returns a new Size instance with values copied from this one.

      Returns Size

    • Set the width and height properties. The widthOrSize parameter can be any object containing 'width' and 'height' properties, or a numeric value for the 'width' value. In the latter case, if a height parameter is passed, it is assigned to the 'height' value; otherwise the widthOrSize parameter is used for both 'width' and 'height'.

      Parameters

      • widthOrSize: number | SizeType = 0
      • Optionalheight: number

      Returns this

    • Returns true if this size equals the widthOrSize SizeType or width & height values.

      Parameters

      • widthOrSize: number | SizeType
      • Optionalheight: number

      Returns boolean

    • Returns true is this size equals the given SizeType to within epsilon decimal places of precision.

      Parameters

      Returns boolean

    • Adds value(s) to current coordinates. Modifies the current value of this instance and returns itself

      Parameters

      Returns this

    • Adds value(s) to current coordinates and returns a new Vect2d object.

      Parameters

      Returns Size

    • Multiplies current coordinates by value(s). Modifies the current value of this instance and returns itself

      Parameters

      Returns this

    • Multiplies current coordinates by value(s) and returns a new Vect2d object.

      Parameters

      Returns Size

    • Returns a string representation of an object.

      Returns void

    • Adds value(s) to size and returns new instance, does not modify input value.

      Parameters

      Returns Size

    • Multiplies size coordinates by value(s) and returns new instance, does not modify input value,

      Parameters

      Returns Size

    • Returns a new SizeType object with width and height set from number value(s) or another SizeType object.

      Parameters

      • widthOrSize: number | SizeType = 0
      • Optionalheight: number

      Returns SizeType

    • Sets the width and height values of a SizeType object. The widthOrSize parameter can be any object containing 'width' and 'height' properties, or a numeric value for the 'width' value. In the latter case, if a height parameter is passed, it is assigned to the 'height' value; otherwise the widthOrSize parameter is used for both 'width' and 'height'.

      Parameters

      Returns SizeType

    • Returns true if either of the width or height are less than or equal to zero.

      Parameters

      Returns boolean

    • Returns true if both width and height of sz are zero.

      Parameters

      Returns boolean

    • Returns true if both width and height of sz are within epsilon delta of zero.

      Parameters

      Returns boolean

    • Returns true if sz SizeType equals the widthOrSize SizeType or width & height values.

      Parameters

      Returns boolean

    • Returns true is this SizeType equals the given SizeType to within epsilon decimal places of precision.

      Parameters

      Returns boolean

    • Parameters

      Returns string

    Properties

    width: number = 0
    height: number = 0