aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/editor_import_export.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2015-10-01 16:25:36 -0300
committerJuan Linietsky2015-10-01 16:25:36 -0300
commite055247b17dc9b9d7239b95da2207388d05fd770 (patch)
tree4ddb394e32888cc28a5713543c3a32fb8a2e37d0 /tools/editor/editor_import_export.cpp
parent0840303a9c56f46b55c9f85ff0cc5938f9deb938 (diff)
downloadgodot-e055247b17dc9b9d7239b95da2207388d05fd770.tar.gz
godot-e055247b17dc9b9d7239b95da2207388d05fd770.tar.zst
godot-e055247b17dc9b9d7239b95da2207388d05fd770.zip
-Added ability to use cubic interpolation on image resize (little more quality on non-po2 resizing)
-Added ability for exporter to shrink images to non-integer values. Helps if you want to convert your game artwork from 1080->720 or similar
Diffstat (limited to 'tools/editor/editor_import_export.cpp')
-rw-r--r--tools/editor/editor_import_export.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/editor/editor_import_export.cpp b/tools/editor/editor_import_export.cpp
index 3b5b8fba8..b13473e61 100644
--- a/tools/editor/editor_import_export.cpp
+++ b/tools/editor/editor_import_export.cpp
@@ -1420,12 +1420,12 @@ EditorImportExport::ImageAction EditorImportExport::get_export_image_action() co
return image_action;
}
-void EditorImportExport::set_export_image_shrink(int p_shrink) {
+void EditorImportExport::set_export_image_shrink(float p_shrink) {
image_shrink=p_shrink;
}
-int EditorImportExport::get_export_image_shrink() const{
+float EditorImportExport::get_export_image_shrink() const{
return image_shrink;
}
@@ -1496,12 +1496,12 @@ bool EditorImportExport::image_export_group_get_make_atlas(const StringName& p_e
return image_groups[p_export_group].make_atlas;
}
-void EditorImportExport::image_export_group_set_shrink(const StringName& p_export_group,int p_amount){
+void EditorImportExport::image_export_group_set_shrink(const StringName& p_export_group,float p_amount){
ERR_FAIL_COND(!image_groups.has(p_export_group));
image_groups[p_export_group].shrink=p_amount;
}
-int EditorImportExport::image_export_group_get_shrink(const StringName& p_export_group) const{
+float EditorImportExport::image_export_group_get_shrink(const StringName& p_export_group) const{
ERR_FAIL_COND_V(!image_groups.has(p_export_group),1);
return image_groups[p_export_group].shrink;