blob: 70e66b2ddc56b10f4659008854b488252f0b0c99 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package dev.figboot.cuberender.state;
import java.awt.image.BufferedImage;
public class Texture {
public final BufferedImage image;
public transient int width, height;
public Texture(BufferedImage image) {
this.image = image;
this.width = image.getWidth();
this.height = image.getHeight();
}
public float calcAspect() {
return (float)width / height;
}
}
|