SizeConstraints

Describe what size in logical pixels are possible. A GUIGraphics is given a SizeConstraints in its constructor.

Members

Enums

Type
enum Type
Undocumented in source.

Functions

aspectRatio
int[2] aspectRatio()

_Approximate_ aspect ratio fraction that should be preserved on resize. Only make sense if preserveAspectRatio() yields true.

canResizeHorizontally
bool canResizeHorizontally()
Undocumented in source. Be warned that the author may not have intended to support it.
canResizeVertically
bool canResizeVertically()
Undocumented in source. Be warned that the author may not have intended to support it.
getMaxSmallerValidSize
void getMaxSmallerValidSize(int* inoutWidth, int* inoutHeight)

Given an input size, get a valid size that is the maximum that would fit inside a inoutWidth x inoutHeight, but smaller. Prefer validity if no smaller size is available.

getNearestValidSize
void getNearestValidSize(int* inoutWidth, int* inoutHeight)

Given an input size, get the nearest valid size.

isResizable
bool isResizable()

Returns true if several size are possible.

isValidSize
bool isValidSize(int width, int height)

Returns true if this SizeConstraints allows this size.

preserveAspectRatio
bool preserveAspectRatio()

Returns true if this SizeConstraints preserve plugin aspect ratio.

suggestDefaultSize
void suggestDefaultSize(int* width, int* height)

Suggest a valid size for plugin first opening.

Meta