enum

Draw::ScalingPolicy

Inherits Enum < Comparable < Value < Object

ScalingPolicy is a constant to define how to scale an image

Constants

None = 0

No scaling applied

Stretch = 1

the image is stretched so that its width and height are exactly the given width and height

Width = 2

The image is scaled so that its width is exactly the given width

Height = 3

The image is scaled so that its height is exactly the given height

Fit = 4

The image is scaled to the largest scale that allow the image to fit within a rectangle width x height

SameArea = 5

The image is scaled so that its area is exactly the area of the given rectangle width x height

Fill = 6

The image is scaled to the smallest scale that allow the image to fully cover a rectangle width x height

Instance methods

fill?

Returns true if this enum value equals Fill

Source
fit?

Returns true if this enum value equals Fit

Source
height?

Returns true if this enum value equals Height

Source
none?

Returns true if this enum value equals None

Source
same_area?

Returns true if this enum value equals SameArea

Source
stretch?

Returns true if this enum value equals Stretch

Source
width?

Returns true if this enum value equals Width

Source