mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-05-06 03:24:50 -04:00
Fixes #51
This commit is contained in:
parent
fec657efc8
commit
0c664a34be
1 changed files with 1 additions and 0 deletions
|
@ -543,6 +543,7 @@ func blend_image_with_color(image : Image, color : Color, interpolate_factor : f
|
||||||
var current_color := blended_image.get_pixel(xx, yy)
|
var current_color := blended_image.get_pixel(xx, yy)
|
||||||
if current_color.a > 0:
|
if current_color.a > 0:
|
||||||
var new_color := current_color.linear_interpolate(color, interpolate_factor)
|
var new_color := current_color.linear_interpolate(color, interpolate_factor)
|
||||||
|
new_color.a = current_color.a
|
||||||
blended_image.set_pixel(xx, yy, new_color)
|
blended_image.set_pixel(xx, yy, new_color)
|
||||||
else: # If color is transparent - if it's the eraser
|
else: # If color is transparent - if it's the eraser
|
||||||
blended_image.set_pixel(xx, yy, Color(0, 0, 0, 0))
|
blended_image.set_pixel(xx, yy, Color(0, 0, 0, 0))
|
||||||
|
|
Loading…
Add table
Reference in a new issue