mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-26 02:34:43 -04:00
Replaced the _min and _max Project variables with Project.selected_pixels
This will allow us to create more selection tools in the future, that aren't necessarily rectangular (See #129) and even enhance the current rectangle selection tool (See #56) Current issues spotted so far: Drawing is slower for large images, and bucket filling is also considerably slower even on a 64x64 image. Optimizations are required.
This commit is contained in:
parent
8c965c1858
commit
0f82be765e
10 changed files with 108 additions and 80 deletions
|
@ -80,11 +80,10 @@ func _on_CreateNewImage_confirmed() -> void:
|
|||
Global.canvas.fill_color = fill_color
|
||||
|
||||
var frame : Frame = Global.canvas.new_empty_frame(false, true, Vector2(width, height))
|
||||
var new_project := Project.new([frame])
|
||||
var new_project := Project.new([frame], tr("untitled"), Vector2(width, height).floor())
|
||||
new_project.layers.append(Layer.new())
|
||||
Global.projects.append(new_project)
|
||||
Global.tabs.current_tab = Global.tabs.get_tab_count() - 1
|
||||
Global.current_project.size = Vector2(width, height).floor()
|
||||
Global.canvas.camera_zoom()
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue