subtype idKGScriptParserduration?ð framebaseencodingparms inputFormat inputCountpublicurltitlewww.fxscript.orguitype typedefaultstringvalueamountamountminmaxBÈBHBHcenterpt Centre Pointsmeardirectionsmear directionuiinfolabels horizontalvertical?€@?€?€ smearstretch smear stretchA @@privatestaticsscript //--------------------------------// // Stib's Smear // //for more visit www.fxscript.org // //--------------------------------// //copyright 2003-2005 stephen dixon //This software is free - you may modify and distribute it as you wish as long as: //* the source remains open //*you clearly identify my code as the basis for the modification //* this message remains with the source //this software is released under the terms of the GNU Public license //this software comes with no warranty of fitness for any purpose whatsoever, ok? //this is based on my smear transition Filter "smear" group "stib's filters"; producesAlpha; AlphaType(kAlpha) input url, "www.fxscript.org", Label, "string" input Amount,"amount", Slider, 50, 0, 100; input centerPt, "Centre Point", Point, 0, 0; input smearDirection, "smear direction", Popup, 1, horizontal, vertical input SmearStretch, "smear stretch", Slider, 2, 0, 10; code float w,h; dimensionsof(dest,w,h); image buf1[w][h]; point source1[4], destPoly1[4], destPoly2[4], edge1[4], edge2[4]; BoundsOf(src1, source1); BoundsOf(dest, destPoly1); BoundsOf(dest, destPoly2); centerPt.X *= w; centerPt.Y *= h; buf1 = src1; if (smearDirection==1) //horizontal Scale(source1, centerPt, Amount/100, 1);//decrease the source rectangle towards the centre point edge1[0]= source1[0]; //make a box 1 pixel wide along the outer edge Offset(edge1[0], 0-SmearStretch, 0); edge1[1]= source1[0]; edge1[2]= source1[3]; edge1[3]= source1[3]; Offset(edge1[3], 0-SmearStretch, 0); BoundsOf(dest, destPoly1); destPoly1[1].X= centerPt.X; destpoly1[2].X= centerPt.X; edge2[0]= source1[1]; edge2[1]= source1[1]; Offset(edge2[1], SmearStretch, 0); edge2[2]= source1[2]; Offset(edge2[3], SmearStretch, 0); edge2[3]= source1[2]; BoundsOf(dest, destPoly2); destPoly2[0].X=centerPt.X; destpoly2[3].X=centerPt.X; else if (smearDirection==2) //vertical Scale(source1, centerPt, 1, 1-Amount/100); edge1[0]= source1[0]; Offset(edge1[0], 0, 0-SmearStretch); edge1[1]= source1[1]; Offset(edge1[1], 0, 0-SmearStretch); edge1[2]= source1[1]; edge1[3]= source1[0]; BoundsOf(dest, destPoly1); destPoly1[2].Y= centerPt.X; destpoly1[3].Y= centerPt.X; edge2[0]= source1[3]; edge2[1]= source1[2]; edge2[2]= source1[2]; Offset(edge2[2], 0, SmearStretch); edge2[3]= source1[3]; Offset(edge2[3], 0, SmearStretch); BoundsOf(dest, destPoly2); destPoly2[0].Y= centerPt.Y; destpoly2[1].Y= centerPt.Y; end if BlitRect(buf1, edge1, dest, destPoly1) BlitRect(buf1, edge2, dest, destPoly2) BlitRect(buf1, source1, dest, source1)namesmearscriptid1groupstib's filters producesalpha alphatypeencoded