diff options
Diffstat (limited to 'modules/svg/image_loader_svg.h')
-rw-r--r-- | modules/svg/image_loader_svg.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/modules/svg/image_loader_svg.h b/modules/svg/image_loader_svg.h index f692b1b28c..cf44cd8c50 100644 --- a/modules/svg/image_loader_svg.h +++ b/modules/svg/image_loader_svg.h @@ -52,13 +52,17 @@ public: }; class ImageLoaderSVG : public ImageFormatLoader { - + static struct ReplaceColors { + List<uint32_t> old_colors; + List<uint32_t> new_colors; + } replace_colors; static SVGRasterizer rasterizer; - static void _convert_colors(NSVGimage *p_svg_imge, const Dictionary p_colors); - static Error _create_image(Ref<Image> p_image, const PoolVector<uint8_t> *p_data, float p_scale, bool upsample, const Dictionary *p_replace_color = NULL); + static void _convert_colors(NSVGimage *p_svg_image); + static Error _create_image(Ref<Image> p_image, const PoolVector<uint8_t> *p_data, float p_scale, bool upsample, bool convert_colors = false); public: - static Error create_image_from_string(Ref<Image> p_image, const char *p_svg_str, float p_scale, bool upsample, const Dictionary *p_replace_color = NULL); + static void set_convert_colors(Dictionary *p_replace_color = NULL); + static Error create_image_from_string(Ref<Image> p_image, const char *p_svg_str, float p_scale, bool upsample, bool convert_colors = false); virtual Error load_image(Ref<Image> p_image, FileAccess *f, bool p_force_linear, float p_scale); virtual void get_recognized_extensions(List<String> *p_extensions) const; |