mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-26 16:54:43 -04:00
Created DrawingAlgos.gd and moved a lot of drawing code there
Moved code from Global.gd and Canvas.gd to DrawingAlgos.gd. Will also move the fill_gaps and draw_brush methods of Canvas.gd next. Maybe even refactor the inside of them a bit to make them easier to read.
This commit is contained in:
parent
a5e10631cd
commit
00a0ab882a
8 changed files with 484 additions and 456 deletions
|
@ -447,7 +447,7 @@ func _on_MergeDownLayer_pressed() -> void:
|
|||
var new_layer := Image.new()
|
||||
new_layer.copy_from(c.layers[Global.current_layer - 1][0])
|
||||
new_layer.lock()
|
||||
c.blend_rect(new_layer, selected_layer, Rect2(c.position, c.size), Vector2.ZERO)
|
||||
DrawingAlgos.blend_rect(new_layer, selected_layer, Rect2(c.position, c.size), Vector2.ZERO)
|
||||
new_layers_canvas.remove(Global.current_layer)
|
||||
if !selected_layer.is_invisible() and Global.layers[Global.current_layer - 1][5].size() > 1 and (c in Global.layers[Global.current_layer - 1][5]):
|
||||
new_layers[Global.current_layer - 1][5].erase(c)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue