@Override
public Rectangle getNeededSize() {
float width = this.sizeX, height = this.sizeY;
if (Float.isNaN(width)) {
Rectangle wanted = this.getWantedSize();
if (Float.isNaN(height)) {
width = wanted.width;
height = wanted.height;
} else {
width = wanted.width;
}
} else {
if (Float.isNaN(height)) {
Rectangle wanted = this.getWantedSize();
height = wanted.height;
}
}
return new Rectangle(Vector.ZERO, width, height);
}