different dither
This commit is contained in:
parent
41b28e4fd2
commit
89602f1804
3 changed files with 75 additions and 0 deletions
24
pixler.bas
24
pixler.bas
|
|
@ -238,6 +238,8 @@ sub redraw
|
|||
filledpolygon numarr(),state.fcolor
|
||||
case "floodfill"
|
||||
floodfill numarr(0),numarr(1),numarr(2)
|
||||
case "gradient"
|
||||
ditheredgradient numarr(0),numarr(1),numarr(2),numarr(3),state.fcolor,state.bcolor
|
||||
case ""
|
||||
' blank line do nothing
|
||||
case else
|
||||
|
|
@ -466,6 +468,8 @@ sub canvas
|
|||
do.floodfill canx,cany,drawcol
|
||||
case 10
|
||||
do.eyedropper canx,cany
|
||||
case 11
|
||||
do.gradient state.startx,state.starty,canx,cany
|
||||
end select
|
||||
end sub
|
||||
|
||||
|
|
@ -729,6 +733,26 @@ sub do.eyedropper(x as long,y as long)
|
|||
end if
|
||||
end sub
|
||||
|
||||
sub do.gradient(sx as long,sy as long,ex as long,ey as long)
|
||||
dim osource as long
|
||||
dim odest as long
|
||||
if state.isdrawing then
|
||||
osource=_source
|
||||
odest=_dest
|
||||
if mouseclicked or rmouseclicked then
|
||||
_dest layers(1).ihandle
|
||||
addcommand"gradient ("+tst(sx)+","+tst(sy)+","+tst(ex)+","+tst(ey)+")"
|
||||
state.isdrawing=0
|
||||
ditheredgradient sx,sy,ex,ey,state.fcolor,state.bcolor
|
||||
else
|
||||
_dest layers(2).ihandle
|
||||
thickline sx,sy,ex,ey,state.fcolor
|
||||
end if
|
||||
_source osource
|
||||
_dest odest
|
||||
end if
|
||||
end sub
|
||||
|
||||
function icon (index as long)
|
||||
static init as integer
|
||||
static icons() as long
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue