mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 22:44:42 -04:00
Removed custom blend_rect() method from DrawingAlgos
This commit is contained in:
parent
b15e846f29
commit
6b26bb5b10
3 changed files with 7 additions and 40 deletions
|
@ -375,7 +375,7 @@ func blend_layers(image : Image, frame : Frame, origin : Vector2 = Vector2(0, 0)
|
|||
var pixel_color := cel_image.get_pixel(xx, yy)
|
||||
var alpha : float = pixel_color.a * cel.opacity
|
||||
cel_image.set_pixel(xx, yy, Color(pixel_color.r, pixel_color.g, pixel_color.b, alpha))
|
||||
DrawingAlgos.blend_rect(image, cel_image, Rect2(Global.canvas.location, Global.current_project.size), origin)
|
||||
image.blend_rect(cel_image, Rect2(Global.canvas.location, Global.current_project.size), origin)
|
||||
layer_i += 1
|
||||
image.unlock()
|
||||
|
||||
|
|
|
@ -441,7 +441,7 @@ func _on_MergeDownLayer_pressed() -> void:
|
|||
var new_layer := Image.new()
|
||||
new_layer.copy_from(f.cels[Global.current_project.current_layer - 1].image)
|
||||
new_layer.lock()
|
||||
DrawingAlgos.blend_rect(new_layer, selected_layer, Rect2(Global.canvas.location, Global.current_project.size), Vector2.ZERO)
|
||||
new_layer.blend_rect(selected_layer, Rect2(Global.canvas.location, Global.current_project.size), Vector2.ZERO)
|
||||
new_cels.remove(Global.current_project.current_layer)
|
||||
if !selected_layer.is_invisible() and Global.current_project.layers[Global.current_project.current_layer - 1].linked_cels.size() > 1 and (f in Global.current_project.layers[Global.current_project.current_layer - 1].linked_cels):
|
||||
new_layers[Global.current_project.current_layer - 1].linked_cels.erase(f)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue