It looks like a MIX of Basic and PascalOriginally Posted by jasonfReady code?... Nope. But the code is very simple.
Code:procedure outline( destinationpixels, sourcepixels, transparent, outlinecolour) For x = 0 to sourcewidth For y = 0 to sourceheight if sourcepixels( x,y ) = transparent and ( sourcepixels( x-1, y ) <> transparent or sourcepixels( x+1, y ) <> transparent or sourcepixels( x, y-1 ) <> transparent or sourcepixels( x, y+1 ) <> transparent ) then destinationpixels( x,y ) = outlinecolour end if next y next x end procedureCode:procedure makeglow( destinationpixels, sourcepixels, transparentcolour, outlinecolour , outlinedarknessfactor, outlinesteps ) outline( destinationpixels, sourcepixels, transparent,outlinecolour ) for i = 1 to outlinesteps tempsource = copydestinationtotempdestination( destinationpixels ) outlinecolour = outlinecolour - outlinedarknessfactor outline( destinationpixels, tempsource, transparent, outlinecolour ) next i end procedure
sorry, I can't write it in pascal at the moment, I don't have access to a pascal IDE.. so I've done it in Pseudocode.
Bookmarks