mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-12-18 10:54:43 -05: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
|
|
@ -375,7 +375,7 @@ func blend_layers(image: Image, canvas: Canvas, origin: Vector2 = Vector2(0, 0))
|
|||
var pixel_color := layer_image.get_pixel(xx, yy)
|
||||
var alpha : float = pixel_color.a * layer[2]
|
||||
layer_image.set_pixel(xx, yy, Color(pixel_color.r, pixel_color.g, pixel_color.b, alpha))
|
||||
canvas.blend_rect(image, layer_image, Rect2(canvas.position, canvas.size), origin)
|
||||
DrawingAlgos.blend_rect(image, layer_image, Rect2(canvas.position, canvas.size), origin)
|
||||
layer_i += 1
|
||||
image.unlock()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue