dplug.gui.sizeconstraints

Defines possible size for a plugin.

Members

Functions

makeSizeConstraintsBounds
SizeConstraints makeSizeConstraintsBounds(int minWidth, int minHeight, int maxWidth, int maxHeight, int defaultWidth, int defaultHeight)

Build a SizeConstraints that describes a rectangular range of size, in logical pixels. All continous sizes are valid within these bounds. Aspect ratio is NOT preserved.

makeSizeConstraintsContinuous
SizeConstraints makeSizeConstraintsContinuous(int defaultWidth, int defaultHeight, float minScale, float maxScale)

Build a SizeConstraints that describes UI dimensions, in logical pixels. Aspect ratio is preserved over a range of continuously possible scale factors.

makeSizeConstraintsDiscrete
SizeConstraints makeSizeConstraintsDiscrete(int defaultWidth, int defaultHeight, const(float)[] availableScales)

Build a SizeConstraints that describes multiple UI dimensions, in logical pixels. Aspect ratio is preserved.

makeSizeConstraintsDiscreteXY
SizeConstraints makeSizeConstraintsDiscreteXY(int defaultWidth, int defaultHeight, const(float)[] availableRatiosX, const(float)[] availableRatiosY)

Build a SizeConstraints that describes several scale factors for X and Y, in logical pixels. Aspect ratio is NOT preserved.

makeSizeConstraintsFixed
SizeConstraints makeSizeConstraintsFixed(int width, int height)

Build a SizeConstraints that describes a fixed UI dimensions, in logical pixels.

Structs

SizeConstraints
struct SizeConstraints

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

Meta

Authors

Guillaume Piolat