struct

Espresso::Scale

Inherits Struct / Value / Object

Scaling of an object in two-dimensions. Contains an x and y scaling amount represented as 32-bit floating-point numbers.

A value of 1 means no scaling, or original size. A value of 2, twice the size (bigger), and 0.5, half the size (smaller).

Constructors

new(x : Float32, y : Float32)

Creates the scale with initial values.

Source

Instance methods

to_s(io)

Creates a string representation of the scale.

Source
x

Horizontal scaling amount.

Source
y

Vertical scaling amount.

Source