subtypeidKGScriptParserduration?ð framebaseencodingparms inputFormat inputCountpublicstartypetitletypeuitypeuiinfolabelsstarflowerstar2typemin?€max@@default?€value?€pointsnumber of points@@Bp@ @ rampB´ masterscale master scaleDzBÈBÈ!B´ scalestroke scale strokeinner radiusn 1ÃHCHApApunits%outerradius 2ÃHCHB B +% centrepointcentrerot8nmaster rotation Ç  G   innerot8ninner rotation ôC´ outerot8nouter rotation ôC´asteriskasterisk Ç  G  geargear Ç  G  oblacityradius3ÖC–BÈBÈ cardioidicityradius4ÖC–BÈBÈhas_fillfillcol fill colourÿÿÿÿÿÿÿÿ hasoutlinestroke linecolour line colourÿÿ linewidth line widthC–?€?€!B´softsoftnessBÈ?€?€+%privatestaticsscript¶//--------------------------------// // Stib's Star Generator // // for more visit www.fxscript.org // //--------------------------------// //copyright 2005 stephen dixon //This software is free - you may use, modify and distribute it as you wish, with the following provisos: //*it may not be used by any military organisation, or to produce goods or services for any military organisation. //* this source code must remain open //* this message and the accompanying doccumentation files must remain with the source //additionally this software is released under the terms of the GNU general Public license //see http://www.gnu.org/licenses/gpl.html for the full text of this license or look at the readme that came with the plugins //this software comes with no warranty of fitness for any purpose whatsoever, ok. //if you like it or if you do something creative with it let me know, I'd love to hear from you. // fxscripts@fxscript.org is the address scriptid "stib's star generator 2.0" generator "stib's star generator 2.0"; group "stib's generators"; producesAlpha; AlphaType(kAlpha) input starType, "type", Popup, 1, "star", "flower", "star2" input points, "number of points", Slider, 5, 3, 60 ramp 90 input MasterScale, "master scale", Slider, 100, 0, 1000 ramp 90 input ScaleStroke, "scale stroke", CheckBox, true input inner, "radiusn 1", slider, 15, -200, 200 label "%" input outer, "radius 2", slider, 35, -200, 200 label "%" input centrepoint, "centre", Point, 0, 0; input rot8n, "master rotation", Angle, 0, -36000, 36000; input inneRot8n, "inner rotation", Angle, 0, -360, 360 input outeRot8n, "outer rotation", Angle, 0, -360, 360 input asterisk, "asterisk", angle, 0, -36000, 36000 input gear, "gear", angle, 0, -36000, 36000 input oblacity, "radius3", Slider, 100, -300, 300 input cardioidicity, "radius4", Slider, 100, -300, 300 input has_Fill, "fill", CheckBox, true input col, "fill colour", Color, 255, 255, 255, 255; input hasOutline, "stroke", CheckBox, true input lineColour, "line colour", Color, 255, 0,0,0; input lineWidth ,"line width", Slider, 1, 0, 300 ramp 90; input soft, "softness", slider, 1, 0, 100 label "%" code MasterScale /= 100; if ScaleStroke == true lineWidth *= MasterScale end if inner *= MasterScale outer *= MasterScale //oblacity *= MasterScale //cardioidicity *= MasterScale ChannelFill(dest, 0, -1, -1, -1) points = Integer(points) exposedbackground=1; point outerpoints[points*2], innerPoints[points*2], flowerPoint[points*2]; if starType == 1 //normal star point star[points*4]; else point star[points*6] end if float width, height, i//, min, hbend, vbend DimensionsOf(dest, width, height) image buf1[width][height]; inner *= width/100; outer *= width/100; centrepoint.X *=width centrepoint.Y *= height if starType == 2 //flower - give the asyterisk value a kick along asterisk = ((90-asterisk)/points); else asterisk = ((180-asterisk)/points); end if gear = (gear/points); oblacity /=100 cardioidicity /=100; Repeat With i = 0 to points*2-1 innerPoints[i] = {centrepoint.X+inner, centrepoint.Y} outerpoints[i] = {centrepoint.X+outer, centrepoint.Y} End Repeat Repeat With i = 0 to points-1 flowerPoint[i*2] = {centrepoint.X+outer*oblacity, centrepoint.Y} flowerPoint[i*2+1] = {centrepoint.X+inner*cardioidicity, centrepoint.Y} Rotate(flowerPoint[i*2], centrepoint, (i-0.5)*360/points+outeRot8n+rot8n, aspectOf(dest)) Rotate(flowerPoint[i*2+1], centrepoint, (i)*360/points+inneRot8n+rot8n, aspectOf(dest)) end Repeat Repeat With i = 0 to points-1 Rotate(innerPoints[i*2], centrepoint, i*360/points-gear+inneRot8n+rot8n, aspectOf(dest)) Rotate(innerPoints[i*2+1], centrepoint, i*360/points+gear+inneRot8n+rot8n, aspectOf(dest)) End Repeat Repeat With i = 0 to points-1 Rotate(outerPoints[i*2], centrepoint, i*360/points-asterisk+outeRot8n+rot8n, aspectOf(dest)) Rotate(outerPoints[i*2+1], centrepoint, i*360/points+asterisk+outeRot8n+rot8n, aspectOf(dest)) End Repeat i=0 if starType !=1 Repeat With i = 0 to points-1 star[i*6] = flowerPoint[i*2] star[i*6+1] = outerPoints[i*2] star[i*6+2] = innerPoints[i*2] star[i*6+3] = flowerPoint[i*2+1] star[i*6+4] = innerPoints[i*2+1] star[i*6+5] = outerPoints[i*2+1] End Repeat else Repeat With i = 0 to points-1 star[i*4] = outerPoints[i*2] star[i*4+1] = innerPoints[i*2] star[i*4+2] = innerPoints[i*2+1] star[i*4+3] = outerPoints[i*2+1] End Repeat end if // if (has_Fill==true)&&(startype !=2) FillPoly(star, buf1, col) end if if (hasOutline == 1) if (starType != 2) //straight lines if (starType == 3) repeat with i = 0 to points*6-2 Line(star[i],star[i+1], buf1, lineColour, lineWidth) End Repeat Line(star[points*6-1],star[0], buf1, lineColour, lineWidth) else repeat with i = 0 to points*4-2 Line(star[i],star[i+1], buf1, lineColour, lineWidth) End Repeat Line(star[points*4-1],star[0], buf1, lineColour, lineWidth) end if else repeat with i = 0 to points-2 //Line(flowerpoint[i*2], outerpoints[i*2], buf1, lineColour, lineWidth) //Line(outerpoints[i*2], innerPoints[i*2],buf1, lineColour, lineWidth) CurveTo(flowerpoint[i*2], outerpoints[i*2], innerPoints[i*2], buf1, lineColour, lineWidth) CurveTo(innerPoints[i*2], flowerpoint[i*2+1], innerPoints[i*2+1], buf1, lineColour, lineWidth) CurveTo(innerPoints[i*2+1], outerpoints[i*2+1], flowerpoint[i*2+2], buf1, lineColour, lineWidth) End Repeat i = points-1 CurveTo(flowerpoint[i*2], outerpoints[i*2], innerPoints[i*2], buf1, lineColour, lineWidth) CurveTo(innerPoints[i*2], flowerpoint[i*2+1], innerPoints[i*2+1], buf1, lineColour, lineWidth) CurveTo(innerPoints[i*2+1], outerpoints[i*2+1], flowerpoint[0], buf1, lineColour, lineWidth) end if end if BlurChannel(buf1, dest, soft, true, true, true, true, AspectOf(dest))scriptidstib's star generator 2.0namestib's star generator 2.0groupstib's generators producesalpha alphatypeencoded