mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Make FileAccess and DirAccess classes reference counted.
This commit is contained in:
@@ -136,7 +136,7 @@ void ImageLoaderSVG::get_recognized_extensions(List<String> *p_extensions) const
|
||||
p_extensions->push_back("svg");
|
||||
}
|
||||
|
||||
Error ImageLoaderSVG::load_image(Ref<Image> p_image, FileAccess *p_fileaccess, bool p_force_linear, float p_scale) {
|
||||
Error ImageLoaderSVG::load_image(Ref<Image> p_image, Ref<FileAccess> p_fileaccess, bool p_force_linear, float p_scale) {
|
||||
String svg = p_fileaccess->get_as_utf8_string();
|
||||
create_image_from_string(p_image, svg, p_scale, false, false);
|
||||
ERR_FAIL_COND_V(p_image->is_empty(), FAILED);
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
void set_replace_colors(Dictionary p_replace_colors) { replace_colors = p_replace_colors; }
|
||||
void create_image_from_string(Ref<Image> p_image, String p_string, float p_scale, bool p_upsample, bool p_convert_color);
|
||||
|
||||
virtual Error load_image(Ref<Image> p_image, FileAccess *p_fileaccess, bool p_force_linear, float p_scale) override;
|
||||
virtual Error load_image(Ref<Image> p_image, Ref<FileAccess> p_fileaccess, bool p_force_linear, float p_scale) override;
|
||||
virtual void get_recognized_extensions(List<String> *p_extensions) const override;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user