From 15c186d8a156ba8a805b25ed13baafc121bd2dbd Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Mon, 12 Aug 2024 16:36:20 +0300 Subject: [PATCH] Re-introduce #729 to fix an issue where the bucket tool filled with a slightly wrong color We should probably keep this issue in mind though in case we find a better solution, but this seems to be working for now. --- src/Tools/DesignTools/Bucket.gd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Tools/DesignTools/Bucket.gd b/src/Tools/DesignTools/Bucket.gd index a2dbf3df5..2e640a365 100644 --- a/src/Tools/DesignTools/Bucket.gd +++ b/src/Tools/DesignTools/Bucket.gd @@ -454,7 +454,10 @@ func _compute_segments_for_image( func _color_segments(image: Image) -> void: if _fill_with == FillWith.COLOR or _pattern == null: - var color: Color = tool_slot.color + # This is needed to ensure that the color used to fill is not wrong, due to float + # rounding issues. + var color_str: String = tool_slot.color.to_html() + var color := Color(color_str) # short circuit for flat colors for c in _allegro_image_segments.size(): var p := _allegro_image_segments[c]