// Copyright 2005 Matt Sandstršm/Too Much Too Soon // This script is freeware, meaning you may copy and // distribute it free of charge, as long as it's kept intact, // including this message. Feel free to use the code as // inspiration for your own scripts, but don't steal. // Email me at mattias@beauty.se if you have any questions. // Thank you. Have fun. filter "Scratch Removal" group "TMTS Paint" input pos, "Position", slider, 50, 0, 100; input wth, "Width", slider, 5, 1, 20; input gd, "Guide", checkbox, 1; InformationFlag("YUVaware") code float h, v point sp[4], dp[4] dimensionsof(dest, h, v) image buf[h][v] dest=src1; if (gd && previewing) then sp[0].x=-h/2+integer(pos/100*h)-integer(wth/2)-1; sp[1].x=sp[0].x; sp[0].y=-v/2; sp[1].y=v/2; Line(sp[0], sp[1], dest, kred, 1); sp[0].x=-h/2+integer(pos/100*h)+wth-integer(wth/2)+1; sp[1].x=sp[0].x; Line(sp[0], sp[1], dest, kred, 1); else MakeRect(dp, 0, -v/2, 2, v) MakeRect(sp, -h/2+integer(pos/100*h)-integer(wth/2)-3, -v/2, 2, v) blitrect(src1,sp,buf,dp); MakeRect(dp, 2, -v/2, 3, v) MakeRect(sp, -h/2+integer(pos/100*h)+wth-integer(wth/2)+1, -v/2, 3, v) blitrect(src1,sp,buf,dp); MakeRect(sp, 0, -v/2, 4, v) MakeRect(dp, -h/2+integer(pos/100*h)-integer(wth/2)-2, -v/2, wth+4, v) blitrect(buf,sp,dest,dp); end if;