mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 17:24:44 -04:00
Affect area now affects the previews. (#320)
This commit is contained in:
parent
719708fb10
commit
60c5ec9ad5
6 changed files with 31 additions and 5 deletions
|
@ -69,7 +69,11 @@ func _on_AButton_toggled(button_pressed : bool) -> void:
|
|||
|
||||
|
||||
func update_preview() -> void:
|
||||
preview_image.copy_from(current_cel)
|
||||
match affect:
|
||||
CEL:
|
||||
preview_image.copy_from(current_cel)
|
||||
_:
|
||||
preview_image.copy_from(current_frame)
|
||||
DrawingAlgos.desaturate_image(preview_image, pixels, red, green, blue, alpha)
|
||||
preview_image.unlock()
|
||||
preview_texture.create_from_image(preview_image, 0)
|
||||
|
|
|
@ -60,7 +60,11 @@ func _on_SelectionCheckBox_toggled(button_pressed : bool) -> void:
|
|||
|
||||
|
||||
func update_preview() -> void:
|
||||
preview_image.copy_from(current_cel)
|
||||
match affect:
|
||||
CEL:
|
||||
preview_image.copy_from(current_cel)
|
||||
_:
|
||||
preview_image.copy_from(current_frame)
|
||||
flip_image(preview_image, pixels)
|
||||
preview_texture.create_from_image(preview_image, 0)
|
||||
preview.texture = preview_texture
|
||||
|
|
|
@ -65,7 +65,11 @@ func reset() -> void:
|
|||
|
||||
|
||||
func update_preview() -> void:
|
||||
preview_image.copy_from(current_cel)
|
||||
match affect:
|
||||
CEL:
|
||||
preview_image.copy_from(current_cel)
|
||||
_:
|
||||
preview_image.copy_from(current_frame)
|
||||
DrawingAlgos.adjust_hsv(preview_image, hue_slider.value, sat_slider.value, val_slider.value, pixels)
|
||||
preview_texture.create_from_image(preview_image, 0)
|
||||
preview.texture = preview_texture
|
||||
|
|
|
@ -69,7 +69,11 @@ func _on_AButton_toggled(button_pressed : bool) -> void:
|
|||
|
||||
|
||||
func update_preview() -> void:
|
||||
preview_image.copy_from(current_cel)
|
||||
match affect:
|
||||
CEL:
|
||||
preview_image.copy_from(current_cel)
|
||||
_:
|
||||
preview_image.copy_from(current_frame)
|
||||
DrawingAlgos.invert_image_colors(preview_image, pixels, red, green, blue, alpha)
|
||||
preview_image.unlock()
|
||||
preview_texture.create_from_image(preview_image, 0)
|
||||
|
|
|
@ -76,7 +76,11 @@ func _on_InsideImageCheckBox_toggled(button_pressed : bool) -> void:
|
|||
|
||||
|
||||
func update_preview() -> void:
|
||||
preview_image.copy_from(current_cel)
|
||||
match affect:
|
||||
CEL:
|
||||
preview_image.copy_from(current_cel)
|
||||
_:
|
||||
preview_image.copy_from(current_frame)
|
||||
DrawingAlgos.generate_outline(preview_image, pixels, color, thickness, diagonal, inside_image)
|
||||
preview_texture.create_from_image(preview_image, 0)
|
||||
preview.texture = preview_texture
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue