mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 21:34:43 -04:00
UndoRedo vol 11 - Remove custom brush has UndoRedo
- Removing a custom brush can now be undone and redone. - Fixed custom brush symmetry on mirrored drawing
This commit is contained in:
parent
5896d1f06d
commit
e6bd897d1f
3 changed files with 41 additions and 11 deletions
|
@ -537,8 +537,8 @@ func draw_pixel(pos : Vector2, color : Color, current_mouse_button : String) ->
|
|||
src_rect.size.y = min(src_rect.size.y, selection_rect.size.y)
|
||||
|
||||
#Handle mirroring
|
||||
var mirror_x := east_limit + west_limit - dst.x - 1
|
||||
var mirror_y := south_limit + north_limit - dst.y - 1
|
||||
var mirror_x := east_limit + west_limit - pos.x - (pos.x - dst.x) - 1
|
||||
var mirror_y := south_limit + north_limit - pos.y - (pos.y - dst.y) - 1
|
||||
|
||||
if color.a > 0: #If it's the pencil
|
||||
layers[current_layer_index][0].blend_rect(custom_brush_image, src_rect, dst)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue