mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Restored LightenDarken's previous behavior
Fixes a minor issue from 6cce27a360
This commit is contained in:
parent
f321b6d101
commit
bcc0d359dc
|
@ -129,8 +129,8 @@ func update_mirror_brush() -> void:
|
||||||
_mirror_brushes.xy.flip_y()
|
_mirror_brushes.xy.flip_y()
|
||||||
|
|
||||||
|
|
||||||
func update_mask() -> void:
|
func update_mask(can_skip := true) -> void:
|
||||||
if Global.pressure_sensitivity_mode == Global.PressureSensitivity.NONE:
|
if can_skip and Global.pressure_sensitivity_mode == Global.PressureSensitivity.NONE:
|
||||||
return
|
return
|
||||||
var size := _get_draw_image().get_size()
|
var size := _get_draw_image().get_size()
|
||||||
# Faster than zeroing PoolByteArray directly. See: https://github.com/Orama-Interactive/Pixelorama/pull/439
|
# Faster than zeroing PoolByteArray directly. See: https://github.com/Orama-Interactive/Pixelorama/pull/439
|
||||||
|
@ -347,7 +347,7 @@ func _set_pixel(position : Vector2) -> void:
|
||||||
|
|
||||||
var image := _get_draw_image()
|
var image := _get_draw_image()
|
||||||
var i := int(position.x + position.y * image.get_size().x)
|
var i := int(position.x + position.y * image.get_size().x)
|
||||||
if Global.pressure_sensitivity_mode != Global.PressureSensitivity.NONE:
|
if _mask.size() >= i + 1:
|
||||||
if _mask[i] < Tools.pen_pressure:
|
if _mask[i] < Tools.pen_pressure:
|
||||||
_mask[i] = Tools.pen_pressure
|
_mask[i] = Tools.pen_pressure
|
||||||
_drawer.set_pixel(image, position, tool_slot.color)
|
_drawer.set_pixel(image, position, tool_slot.color)
|
||||||
|
|
|
@ -200,7 +200,7 @@ func update_strength() -> void:
|
||||||
|
|
||||||
|
|
||||||
func draw_start(position : Vector2) -> void:
|
func draw_start(position : Vector2) -> void:
|
||||||
update_mask()
|
update_mask(false)
|
||||||
_changed = false
|
_changed = false
|
||||||
_drawer.color_op.changed = false
|
_drawer.color_op.changed = false
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue