aboutsummaryrefslogtreecommitdiff
path: root/extension/src/Utilities.hpp
diff options
context:
space:
mode:
author Hop311 <hop3114@gmail.com>2023-08-10 13:00:54 +0200
committer Hop311 <hop3114@gmail.com>2023-08-10 13:00:54 +0200
commit4c43951e70aaa2e7265d3b3f3c4964c048b9328d (patch)
treec6d46df1686710ccacd63ceb16d687cb55877457 /extension/src/Utilities.hpp
parent505176d9cabe76cff7cdac6b4d4ef1c77ccb00d9 (diff)
PieChart data and image now come from c++ layer
Diffstat (limited to 'extension/src/Utilities.hpp')
-rw-r--r--extension/src/Utilities.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/extension/src/Utilities.hpp b/extension/src/Utilities.hpp
index 681b893..e8796e9 100644
--- a/extension/src/Utilities.hpp
+++ b/extension/src/Utilities.hpp
@@ -16,5 +16,15 @@ namespace OpenVic {
return str.c_str();
}
+ inline godot::Color to_godot_color(colour_t colour) {
+ return { colour_byte_to_float((colour >> 16) & 0xFF), colour_byte_to_float((colour >> 8) & 0xFF), colour_byte_to_float(colour & 0xFF) };
+ }
+
godot::Ref<godot::Image> load_godot_image(godot::String const& path);
+
+ void draw_pie_chart(godot::Ref<godot::Image> image,
+ godot::Array const& stopAngles, godot::Array const& colours, float radius,
+ godot::Vector2 shadow_displacement, float shadow_tightness, float shadow_radius, float shadow_thickness,
+ godot::Color trim_colour, float trim_size, float gradient_falloff, float gradient_base,
+ bool donut, bool donut_inner_trim, float donut_inner_radius);
}