Brush size and canvas
This commit is contained in:
parent
c7c145f0b1
commit
b978f2e8cf
1 changed files with 3 additions and 3 deletions
|
|
@ -43,9 +43,9 @@ layers(2).ihandle=_newimage(320,320,32)
|
|||
layers(3).ihandle=_newimage(320,320,32)
|
||||
|
||||
_dest layers(0).ihandle
|
||||
addcommand "canvas ("+str$(_width)+","+str$(_height)+")"
|
||||
line (0,0)-(_width-1,_height-1),_rgb32(255),bf
|
||||
_dest 0
|
||||
|
||||
state.tool = 1
|
||||
state.zoom = 1.0
|
||||
state.offsetX = 70 + 20
|
||||
|
|
@ -129,8 +129,10 @@ canvas
|
|||
select case keyin
|
||||
case "+"
|
||||
state.brushsize=state.brushsize+1
|
||||
addcommand "brushsize ("+str$(state.brushsize)+")"
|
||||
case "-"
|
||||
if state.brushsize>1 then state.brushsize=state.brushsize-1
|
||||
addcommand "brushsize ("+str$(state.brushsize)+")"
|
||||
case chr$(19) ' ctrl+s
|
||||
'TODO: save logic
|
||||
case chr$(27)' esc
|
||||
|
|
@ -377,8 +379,6 @@ sub canvas
|
|||
thickline state.startX, state.startY, canX, canY, drawCol
|
||||
addcommand "line ("+str$(state.startX)+","+str$(state.startY)+","+str$(canX)+","+str$(canY)+","+hex$(drawCol)+")"
|
||||
end if
|
||||
'thickline state.startX, state.startY, canX, canY, drawCol
|
||||
'addcommand "line ("+str$(state.startX)+","+ str$(state.startY)+","+str$(canX)+","+str$(canY)+","+hex$(drawCol)+")"
|
||||
state.startX = canX: state.startY = canY
|
||||
case 2 ' Straight Line
|
||||
thickline state.startX, state.startY, canX, canY, drawCol
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue