Skip to content

Commit

Permalink
Reverts #729 for a speedup, hopefully the bug won't get re-introduced
Browse files Browse the repository at this point in the history
  • Loading branch information
OverloadedOrama committed Aug 20, 2023
1 parent 244e40b commit e442c31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Tools/Bucket.gd
Original file line number Diff line number Diff line change
Expand Up @@ -450,13 +450,13 @@ func _compute_segments_for_image(

func _color_segments(image: Image) -> void:
if _fill_with == FillWith.COLOR or _pattern == null:
var color_str: String = tool_slot.color.to_html()
var color: Color = tool_slot.color
# short circuit for flat colors
for c in _allegro_image_segments.size():
var p := _allegro_image_segments[c]
for px in range(p.left_position, p.right_position + 1):
# We don't have to check again whether the point being processed is within the bounds
image.set_pixel(px, p.y, Color(color_str))
image.set_pixel(px, p.y, color)
else:
# shortcircuit tests for patternfills
var pattern_size := _pattern.image.get_size()
Expand Down

0 comments on commit e442c31

Please sign in to comment.