1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-31 07:29:49 +00:00

Fixed issue where custom brushes were sometimes not being drawn

This commit is contained in:
OverloadedOrama 2020-04-03 16:13:49 +03:00
parent b4a312d702
commit 1963d99e45

View file

@ -993,8 +993,10 @@ func blend_rect(bg : Image, brush : Image, src_rect : Rect2, dst : Vector2) -> v
var dst_x := dest_rect.position.x + x;
var dst_y := dest_rect.position.y + y;
brush.lock()
var brush_color := brush.get_pixel(src_x, src_y)
var bg_color := bg.get_pixel(dst_x, dst_y)
var out_color := blend_colors(brush_color, bg_color)
if out_color.a != 0:
bg.set_pixel(dst_x, dst_y, out_color)
brush.unlock()