1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-24 15:26:15 +00:00

Prevent upscaled SVG from exceeding Image bounds

Also expose Image MAX_WIDTH and MAX_HEIGHT.

Fixes #24455.

(cherry picked from commit cc0842f9a6)
This commit is contained in:
Rémi Verschelde
2019-01-28 15:33:56 +01:00
parent c2541188f2
commit 2ff2b727b6
4 changed files with 18 additions and 4 deletions

View File

@@ -2303,6 +2303,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);