#ifndef IMAGE_UTILS_H #define IMAGE_UTILS_H #include #include #include #include namespace godot { class ImageUtils : public Reference { GODOT_CLASS(ImageUtils, Reference) public: static void _register_methods(); ImageUtils(); ~ImageUtils(); void _init(); Vector2 get_red_range(Ref image_ref, Rect2 rect) const; float get_red_sum(Ref image_ref, Rect2 rect) const; float get_red_sum_weighted(Ref image_ref, Ref brush_ref, Vector2 p_pos, float factor) const; void add_red_brush(Ref image_ref, Ref brush_ref, Vector2 p_pos, float factor) const; void lerp_channel_brush(Ref image_ref, Ref brush_ref, Vector2 p_pos, float factor, float target_value, int channel) const; void lerp_color_brush(Ref image_ref, Ref brush_ref, Vector2 p_pos, float factor, Color target_value) const; float generate_gaussian_brush(Ref image_ref) const; void blur_red_brush(Ref image_ref, Ref brush_ref, Vector2 p_pos, float factor); void paint_indexed_splat(Ref index_map_ref, Ref weight_map_ref, Ref brush_ref, Vector2 p_pos, int texture_index, float factor); //void erode_red_brush(Ref image_ref, Ref brush_ref, Vector2 p_pos, float factor); private: std::vector _blur_buffer; }; } // namespace godot #endif // IMAGE_UTILS_H