1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

Replace some Vector2s with Vector2is

This commit is contained in:
Emmanouil Papadeas 2024-07-23 13:51:02 +03:00
parent 7e2fad6b38
commit c6d24d458e
4 changed files with 5 additions and 5 deletions

View file

@ -222,7 +222,7 @@ func update_mask(can_skip := true) -> void:
_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)
_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:
var rect := Rect2i(Vector2.ZERO, dst.get_size())
var rect := Rect2i(Vector2i.ZERO, dst.get_size())
var brush_size := indicator.get_size()
pos -= brush_size / 2
for y in brush_size.y:

View file

@ -13,7 +13,7 @@ func _draw() -> void:
if Global.grid_draw_over_tile_mode:
target_rect = Global.current_project.tiles.get_bounding_rect()
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():
return

View file

@ -821,7 +821,7 @@ func new_brush() -> void:
func select_all() -> void:
var undo_data_tmp := get_undo_data(false)
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)
commit_undo("Select", undo_data_tmp)

View file

@ -92,6 +92,6 @@ func _flip_selection(project := Global.current_project) -> void:
project.selection_map.fill(Color(0, 0, 0, 0))
project.selection_map.blend_rect(
smaller_bitmap_image,
Rect2i(Vector2.ZERO, smaller_bitmap_image.get_size()),
Rect2i(Vector2i.ZERO, smaller_bitmap_image.get_size()),
selection_rect.position
)