mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-02-22 05:23:14 +00:00
Some more static typing
Apologies for the pointless-ish commits but I'm on vacation and time is limited :(
This commit is contained in:
parent
3bfbf07d58
commit
d564139f98
2 changed files with 6 additions and 6 deletions
|
@ -245,7 +245,7 @@ func _prepare_circle_tool(fill: bool) -> void:
|
||||||
_circle_tool_shortcut.append(Vector2(m - _brush_size, n - _brush_size))
|
_circle_tool_shortcut.append(Vector2(m - _brush_size, n - _brush_size))
|
||||||
|
|
||||||
|
|
||||||
# Make sure to alway have invoked _prepare_tool() before this. This computes the coordinates to be
|
# Make sure to alwayσ have invoked _prepare_tool() before this. This computes the coordinates to be
|
||||||
# drawn if it can (except for the generic brush, when it's actually drawing them)
|
# drawn if it can (except for the generic brush, when it's actually drawing them)
|
||||||
func _draw_tool(position: Vector2) -> PoolVector2Array:
|
func _draw_tool(position: Vector2) -> PoolVector2Array:
|
||||||
if !Global.current_project.layers[Global.current_project.current_layer].can_layer_get_drawn():
|
if !Global.current_project.layers[Global.current_project.current_layer].can_layer_get_drawn():
|
||||||
|
@ -567,10 +567,10 @@ func _create_line_indicator(indicator: BitMap, start: Vector2, end: Vector2) ->
|
||||||
var dy := int(-abs(end.y - start.y))
|
var dy := int(-abs(end.y - start.y))
|
||||||
var err := dx + dy
|
var err := dx + dy
|
||||||
var e2 := err << 1
|
var e2 := err << 1
|
||||||
var sx = 1 if start.x < end.x else -1
|
var sx := 1 if start.x < end.x else -1
|
||||||
var sy = 1 if start.y < end.y else -1
|
var sy := 1 if start.y < end.y else -1
|
||||||
var x = start.x
|
var x := start.x
|
||||||
var y = start.y
|
var y := start.y
|
||||||
while !(x == end.x && y == end.y):
|
while !(x == end.x && y == end.y):
|
||||||
_blit_indicator(bitmap, indicator, Vector2(x, y))
|
_blit_indicator(bitmap, indicator, Vector2(x, y))
|
||||||
e2 = err << 1
|
e2 = err << 1
|
||||||
|
|
|
@ -40,7 +40,7 @@ func _get_shape_points(size: Vector2) -> PoolVector2Array:
|
||||||
|
|
||||||
var size_offset := Vector2.ONE * (_thickness - 1)
|
var size_offset := Vector2.ONE * (_thickness - 1)
|
||||||
var new_size := size + size_offset
|
var new_size := size + size_offset
|
||||||
var inner_ellipse_size = new_size - size_offset
|
var inner_ellipse_size := new_size - size_offset
|
||||||
|
|
||||||
# The inner ellipse is to small to create a gap in the middle of the ellipse,
|
# The inner ellipse is to small to create a gap in the middle of the ellipse,
|
||||||
# just return a filled ellipse
|
# just return a filled ellipse
|
||||||
|
|
Loading…
Add table
Reference in a new issue