function param1() return "筆圧透明度", 0, 1, 0 end function use_base() return true end function main( x, y, p ) if firstDraw then firstDrawX = x firstDrawY = y end local w = bs_width() if w < 0.25 then w = 0.25 end local updateDist = w / 4 if w > 20 then updateDist = w/10 end if w > 100 then updateDist = w/14 end if not firstDraw then local distance = bs_distance( lastDrawX - x, lastDrawY - y ) if distance < updateDist then return 0 end end local r,g,b = bs_fore() local a = bs_opaque() * 255 if bs_param1() == 1 then a = p * a end bs_ellipse( x,y, w,w, 0, r,g,b, a ) local bsx,bsy = bs_base() local noInit = (bsx == -1) and (bsy == -1) if noInit then bsx = firstDrawX bsy = firstDrawY end bs_ellipse( bsx - (x - bsx), y, w,w, 0, r,g,b, a ) lastDrawX = x lastDrawY = y firstDraw = false return 1 end bs_setmode( 1 ) lastDrawX = 0 lastDrawY = 0 firstDraw = true firstDrawX = 0 firstDrawY = 0