forked from extern/easydiffusion
added a fill action
This commit is contained in:
parent
9d19698bf3
commit
7f36473544
@ -99,6 +99,18 @@ const IMAGE_EDITOR_TOOLS = [
|
||||
]
|
||||
|
||||
const IMAGE_EDITOR_ACTIONS = [
|
||||
{
|
||||
id: "fill",
|
||||
name: "Fill",
|
||||
icon: "fa-solid fa-fill-drip",
|
||||
handler: (editor) => {
|
||||
editor.ctx_current.globalCompositeOperation = "source-over"
|
||||
editor.ctx_current.rect(0, 0, editor.width, editor.height)
|
||||
editor.ctx_current.fill()
|
||||
editor.setBrush()
|
||||
},
|
||||
trackHistory: true
|
||||
},
|
||||
{
|
||||
id: "clear",
|
||||
name: "Clear",
|
||||
|
Loading…
Reference in New Issue
Block a user