mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-19 01:29:49 +00:00
Shape tool blue indicators now reflect their proper shape
This commit is contained in:
parent
873e2b8e9e
commit
240e582070
|
@ -28,10 +28,16 @@ func _on_Thickness_value_changed(value: int) -> void:
|
||||||
|
|
||||||
|
|
||||||
func update_indicator() -> void:
|
func update_indicator() -> void:
|
||||||
var bitmap := BitMap.new()
|
var indicator := BitMap.new()
|
||||||
bitmap.create(Vector2.ONE * _thickness)
|
var rect := _get_result_rect(_start, _dest)
|
||||||
bitmap.set_bit_rect(Rect2(Vector2.ZERO, Vector2.ONE * _thickness), true)
|
var points := _get_points(rect.size)
|
||||||
_indicator = bitmap
|
var t_offset := _thickness - 1
|
||||||
|
var t_offsetv := Vector2(t_offset, t_offset)
|
||||||
|
indicator.create(rect.size + t_offsetv * 2)
|
||||||
|
for point in points:
|
||||||
|
indicator.set_bit(point, 1)
|
||||||
|
|
||||||
|
_indicator = indicator
|
||||||
_polylines = _create_polylines(_indicator)
|
_polylines = _create_polylines(_indicator)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue