public abstract class Scaling extends Object
| Modifier and Type | Field and Description |
|---|---|
static Scaling |
fill
Scales the source to fill the target while keeping the same aspect ratio.
|
static Scaling |
fillX
Scales the source to fill the target in the x direction while keeping the same aspect ratio.
|
static Scaling |
fillY
Scales the source to fill the target in the y direction while keeping the same aspect ratio.
|
static Scaling |
fit
Scales the source to fit the target while keeping the same aspect ratio.
|
static Scaling |
none
The source is not scaled.
|
static Scaling |
stretch
Scales the source to fill the target.
|
static Scaling |
stretchX
Scales the source to fill the target in the x direction, without changing the y direction.
|
static Scaling |
stretchY
Scales the source to fill the target in the y direction, without changing the x direction.
|
| Constructor and Description |
|---|
Scaling() |
| Modifier and Type | Method and Description |
|---|---|
abstract Vector2 |
apply(float sourceWidth,
float sourceHeight,
float targetWidth,
float targetHeight)
Returns the size of the source scaled to the target.
|
public static final Scaling fit
public static final Scaling fill
public static final Scaling fillX
public static final Scaling fillY
public static final Scaling stretch
public static final Scaling stretchX
public static final Scaling stretchY
public static final Scaling none
public abstract Vector2 apply(float sourceWidth, float sourceHeight, float targetWidth, float targetHeight)
Copyright © 2021. All rights reserved.