mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-19 01:29:49 +00:00
Replace some Vector2s with Vector2is
This commit is contained in:
parent
7e2fad6b38
commit
c6d24d458e
|
@ -222,7 +222,7 @@ func update_mask(can_skip := true) -> void:
|
||||||
_mask = PackedFloat32Array(nulled_array)
|
_mask = PackedFloat32Array(nulled_array)
|
||||||
|
|
||||||
|
|
||||||
func update_line_polylines(start: Vector2, end: Vector2) -> void:
|
func update_line_polylines(start: Vector2i, end: Vector2i) -> void:
|
||||||
var indicator := _create_line_indicator(_indicator, start, end)
|
var indicator := _create_line_indicator(_indicator, start, end)
|
||||||
_line_polylines = _create_polylines(indicator)
|
_line_polylines = _create_polylines(indicator)
|
||||||
|
|
||||||
|
@ -652,7 +652,7 @@ func _create_line_indicator(indicator: BitMap, start: Vector2i, end: Vector2i) -
|
||||||
|
|
||||||
|
|
||||||
func _blit_indicator(dst: BitMap, indicator: BitMap, pos: Vector2i) -> void:
|
func _blit_indicator(dst: BitMap, indicator: BitMap, pos: Vector2i) -> void:
|
||||||
var rect := Rect2i(Vector2.ZERO, dst.get_size())
|
var rect := Rect2i(Vector2i.ZERO, dst.get_size())
|
||||||
var brush_size := indicator.get_size()
|
var brush_size := indicator.get_size()
|
||||||
pos -= brush_size / 2
|
pos -= brush_size / 2
|
||||||
for y in brush_size.y:
|
for y in brush_size.y:
|
||||||
|
|
|
@ -13,7 +13,7 @@ func _draw() -> void:
|
||||||
if Global.grid_draw_over_tile_mode:
|
if Global.grid_draw_over_tile_mode:
|
||||||
target_rect = Global.current_project.tiles.get_bounding_rect()
|
target_rect = Global.current_project.tiles.get_bounding_rect()
|
||||||
else:
|
else:
|
||||||
target_rect = Rect2i(Vector2.ZERO, Global.current_project.size)
|
target_rect = Rect2i(Vector2i.ZERO, Global.current_project.size)
|
||||||
if not target_rect.has_area():
|
if not target_rect.has_area():
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
@ -821,7 +821,7 @@ func new_brush() -> void:
|
||||||
func select_all() -> void:
|
func select_all() -> void:
|
||||||
var undo_data_tmp := get_undo_data(false)
|
var undo_data_tmp := get_undo_data(false)
|
||||||
clear_selection()
|
clear_selection()
|
||||||
var full_rect := Rect2i(Vector2.ZERO, Global.current_project.size)
|
var full_rect := Rect2i(Vector2i.ZERO, Global.current_project.size)
|
||||||
select_rect(full_rect)
|
select_rect(full_rect)
|
||||||
commit_undo("Select", undo_data_tmp)
|
commit_undo("Select", undo_data_tmp)
|
||||||
|
|
||||||
|
|
|
@ -92,6 +92,6 @@ func _flip_selection(project := Global.current_project) -> void:
|
||||||
project.selection_map.fill(Color(0, 0, 0, 0))
|
project.selection_map.fill(Color(0, 0, 0, 0))
|
||||||
project.selection_map.blend_rect(
|
project.selection_map.blend_rect(
|
||||||
smaller_bitmap_image,
|
smaller_bitmap_image,
|
||||||
Rect2i(Vector2.ZERO, smaller_bitmap_image.get_size()),
|
Rect2i(Vector2i.ZERO, smaller_bitmap_image.get_size()),
|
||||||
selection_rect.position
|
selection_rect.position
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue