Prevent upscaled SVG from exceeding Image bounds

Also expose Image MAX_WIDTH and MAX_HEIGHT.

Fixes #24455.
This commit is contained in:
Rémi Verschelde 2019-01-28 15:33:56 +01:00
parent 89e7c2cb13
commit cc0842f9a6
4 changed files with 18 additions and 4 deletions

View file

@ -2632,6 +2632,9 @@ void Image::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE), "_set_data", "_get_data");
BIND_CONSTANT(MAX_WIDTH);
BIND_CONSTANT(MAX_HEIGHT);
BIND_ENUM_CONSTANT(FORMAT_L8); //luminance
BIND_ENUM_CONSTANT(FORMAT_LA8); //luminance-alpha
BIND_ENUM_CONSTANT(FORMAT_R8);