User Tools

Site Tools


Size

Script wrapper for QSize.

More...

Inherits :

Properties

Constructors

DAZ Script
Size ()
Size ( Size size )
Size ( Number width, Number height )

Methods

DAZ Script
SizeboundedTo ( Size size )
SizeexpandedTo ( Size size )
BooleanisEmpty ()
BooleanisNull ()
BooleanisValid ()
voidscale ( Size size, Number mode )
voidscale ( Number width, Number height, Number mode )
voidtranspose ()
Deprecated
voidtranslate ()

Detailed Description

This is the script counterpart to the QSize type used in the C++ SDK. A Size object is a two dimensional representation of a width and height.

Attention:

  • Inheritance will change to Object in a pending update.

Properties


Number : height

Holds the height of this size.


Number : width

Holds the width of this size.

Constructors


Size()

Default constructor.


Size( Size size )

Copy Constructor.

Parameter(s):

  • size - The Size to copy.

Size( Number width, Number height )

Parameter(s):

  • width - The width for the size.
  • height - The height for the size.

Methods


Size : boundedTo( Size size )

Return Value:

  • A size with the minimum width and height of this size and size.

Since:

  • 4.20.1.92

Size : expandedTo( Size size )

Return Value:

  • A size with the maximum width and height of this size and size.

Since:

  • 4.20.1.92

Boolean : isEmpty()

Return Value:

  • true if width or height is less than or equal to 0, otherwise false.

Since:

  • 4.20.1.92

Boolean : isNull()

Return Value:

Since:

  • 4.20.1.92

Boolean : isValid()

Return Value:

  • true if width and height are greater than or equal to 0, otherwise false.

Since:

  • 4.20.1.92

void : scale( Size size, Number mode )

Scales this size to the specified size.

Parameter(s):

  • size - The size to scale to.
  • mode - The aspect ratio mode to use.
    • 0 = Scale freely, do not preserve aspect ratio.
    • 1 = Scaled to a rectangle as large as possible inside size , preserving aspect ratio.
    • 2 = Scaled to a rectangle as small as possible outside size , preserving aspect ratio.

Since:

  • 4.20.1.92

void : scale( Number width, Number height, Number mode )

Scales this size to the specified width and height.

Parameter(s):

  • width - The width to scale to.
  • height - The height to scale to.
  • mode - The aspect ratio mode to use.
    • 0 = Scale freely, do not preserve aspect ratio.
    • 1 = Scaled to a rectangle as large as possible inside width and height , preserving aspect ratio.
    • 2 = Scaled to a rectangle as small as possible outside width and height , preserving aspect ratio.

Since:

  • 4.20.1.92

void : transpose()

Swaps the width and height of this size.

Since:

  • 4.20.1.92

void : translate()

Deprecated

Exists only to keep old code working. Do not use in new code. Use transpose() instead.