1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

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.
This commit is contained in:
Emmanouil Papadeas 2024-08-12 16:36:20 +03:00
parent 6e360505e3
commit 15c186d8a1

View file

@ -454,7 +454,10 @@ func _compute_segments_for_image(
func _color_segments(image: Image) -> void: func _color_segments(image: Image) -> void:
if _fill_with == FillWith.COLOR or _pattern == null: 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 # short circuit for flat colors
for c in _allegro_image_segments.size(): for c in _allegro_image_segments.size():
var p := _allegro_image_segments[c] var p := _allegro_image_segments[c]