useless comments
This commit is contained in:
parent
b945e5f1b5
commit
6ca29d53e0
1 changed files with 7 additions and 8 deletions
15
pixler.bas
15
pixler.bas
|
|
@ -464,11 +464,10 @@ sub canvas
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
if state.isDrawing then
|
if state.isDrawing then
|
||||||
' We use Layer 2 as the temporary preview "rubber-band" layer
|
|
||||||
_dest layers(2).ihandle
|
_dest layers(2).ihandle
|
||||||
cls , 0
|
cls , 0
|
||||||
select case state.tool
|
select case state.tool
|
||||||
case 1 ' Pencil
|
case 1
|
||||||
_dest layers(1).ihandle
|
_dest layers(1).ihandle
|
||||||
if canX=state.startX and canY=state.startY then
|
if canX=state.startX and canY=state.startY then
|
||||||
thickpixel canX,canY,drawCol
|
thickpixel canX,canY,drawCol
|
||||||
|
|
@ -478,20 +477,20 @@ sub canvas
|
||||||
addcommand "line ("+tst(state.startX)+","+tst(state.startY)+","+tst(canX)+","+tst(canY)+","+hex$(drawCol)+")"
|
addcommand "line ("+tst(state.startX)+","+tst(state.startY)+","+tst(canX)+","+tst(canY)+","+hex$(drawCol)+")"
|
||||||
end if
|
end if
|
||||||
state.startX = canX: state.startY = canY
|
state.startX = canX: state.startY = canY
|
||||||
case 2 ' Straight Line
|
case 2
|
||||||
thickline state.startX, state.startY, canX, canY, drawCol
|
thickline state.startX, state.startY, canX, canY, drawCol
|
||||||
case 3 ' Circle
|
case 3
|
||||||
r = sqr((canX - state.startX)^2 + (canY - state.startY)^2)
|
r = sqr((canX - state.startX)^2 + (canY - state.startY)^2)
|
||||||
thickcircle state.startX, state.startY, r + 1, drawCol
|
thickcircle state.startX, state.startY, r + 1, drawCol
|
||||||
case 4 ' Filled Circle
|
case 4
|
||||||
r = sqr((canX - state.startX)^2 + (canY - state.startY)^2)
|
r = sqr((canX - state.startX)^2 + (canY - state.startY)^2)
|
||||||
filledcircle state.startX, state.startY, r, drawCol
|
filledcircle state.startX, state.startY, r, drawCol
|
||||||
case 5 ' Rect
|
case 5
|
||||||
thickbox state.startX,state.starty,canX,canY,drawCol
|
thickbox state.startX,state.starty,canX,canY,drawCol
|
||||||
|
|
||||||
case 6 ' Filled Rect
|
case 6
|
||||||
filledbox state.startX,state.startY,canX, canY, drawCol
|
filledbox state.startX,state.startY,canX, canY, drawCol
|
||||||
case 7, 8 ' Polygons
|
case 7, 8
|
||||||
if pointCount > 0 then
|
if pointCount > 0 then
|
||||||
for p = 1 to pointCount - 1
|
for p = 1 to pointCount - 1
|
||||||
thickline polypoints((p - 1) * 2), polypoints((p - 1) * 2 + 1), polypoints(p * 2), polypoints(p * 2 + 1), state.fcolor
|
thickline polypoints((p - 1) * 2), polypoints((p - 1) * 2 + 1), polypoints(p * 2), polypoints(p * 2 + 1), state.fcolor
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue