mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 17:24:44 -04:00
Added affecting options to the HSVDialog
First option is to affect the selected pixels only. The second it to affect the current cel, or the entire frame (all cels of the frame). Options to affect all frames and all projects will be added next. I also made changes to Canvas.handle_undo() and handle_redo() to make this work. Once all these options are added successfully in HSVDialog, they will also be added in the rest of the Image effect dialogs.
This commit is contained in:
parent
5612064533
commit
1ce89c6577
4 changed files with 120 additions and 41 deletions
|
@ -454,9 +454,9 @@ func generate_outline(image : Image, outline_color : Color, thickness : int, dia
|
|||
Global.canvas.handle_redo("Draw")
|
||||
|
||||
|
||||
func adjust_hsv(img: Image, delta_h : float, delta_s : float, delta_v : float) -> void:
|
||||
func adjust_hsv(img: Image, delta_h : float, delta_s : float, delta_v : float, pixels : Array) -> void:
|
||||
img.lock()
|
||||
for i in Global.current_project.selected_pixels:
|
||||
for i in pixels:
|
||||
var c : Color = img.get_pixelv(i)
|
||||
# Hue
|
||||
var hue = range_lerp(c.h,0,1,-180,180)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue