mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 21:14:42 -04:00
v0.4 - Undo/Redo, mirrored drawing, lighten/darken tool and more!
In this commit: - Added notification labels that appear when the user does an action (for undoing, redoing and saving) - Fixed symmetry with custom brushes. - In Main.gd, current_save_path and current_export_path get cleared when the user creates a new drawing or opens one. v0.4 of Pixelorama is out! Check https://functionoverload590613498.wordpress.com/2019/11/13/pixelorama-v0-4-is-out/ for the full changelog.
This commit is contained in:
parent
17d117a0b1
commit
d66c501b5c
9 changed files with 79 additions and 18 deletions
|
@ -542,8 +542,12 @@ func draw_pixel(pos : Vector2, color : Color, current_mouse_button : String, cur
|
|||
src_rect.size.y = min(src_rect.size.y, selection_rect.size.y)
|
||||
|
||||
#Handle mirroring
|
||||
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
|
||||
var mirror_x := east_limit + west_limit - pos.x - (pos.x - dst.x)
|
||||
var mirror_y := south_limit + north_limit - pos.y - (pos.y - dst.y)
|
||||
if int(pos_rect_clipped.size.x) % 2 != 0:
|
||||
mirror_x -= 1
|
||||
if int(pos_rect_clipped.size.y) % 2 != 0:
|
||||
mirror_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