Skip to content

Commit

Permalink
Use MODULE_SVG_ENABLED over SVG_ENABLED
Browse files Browse the repository at this point in the history
Tests without svg module enabled were failing due to godotengine/godot#50466.
  • Loading branch information
Xrayez committed Jul 15, 2021
1 parent b1009d3 commit 2987163
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/image/goost_image.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "goost_image.h"

#ifdef SVG_ENABLED // MODULE_SVG_ENABLED in 4.0
#ifdef MODULE_SVG_ENABLED
#include "modules/svg/image_loader_svg.h"
#endif

Expand Down Expand Up @@ -466,7 +466,7 @@ Ref<Image> GoostImage::render_polygon(Vector<Point2> p_polygon, bool p_fill, con

Ref<Image> GoostImage::render_svg(const String &p_svg, real_t p_scale) {
Ref<Image> image;
#ifdef SVG_ENABLED
#ifdef MODULE_SVG_ENABLED
ERR_FAIL_COND_V_MSG(p_svg.empty(), Ref<Image>(), "Empty SVG document.");
ERR_FAIL_COND_V_MSG(p_scale <= 0, Ref<Image>(), "Scale must be positive.");
image.instance();
Expand Down
2 changes: 1 addition & 1 deletion core/image/goost_image_bind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void _GoostImage::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_centroid", "image"), &_GoostImage::get_centroid);

ClassDB::bind_method(D_METHOD("render_polygon", "polygon", "fill", "foreground_color", "background_color"), &_GoostImage::render_polygon, DEFVAL(false), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(Color(0, 0, 0, 0)));
#ifdef SVG_ENABLED
#ifdef MODULE_SVG_ENABLED
ClassDB::bind_method(D_METHOD("render_svg", "svg_document", "scale"), &_GoostImage::render_svg, DEFVAL(1.0));
#endif

Expand Down

0 comments on commit 2987163

Please sign in to comment.