proc
Outline(var/icon/II, color="#000000", inside=TRUE)
var/icon/I=new(II)
var/a=""
var/h=I.Height()
var/w=I.Width()
var/list/BadSpots=list()
for(var/Y=1 to h)
for(var/X=1 to w)
if(BadSpots.Find("[X],[Y]"))
continue
a = I.GetPixel(X,Y)
if(a == null)
continue
if(X>=w||X<=1||Y>=h||Y<=1)
continue
else
if(!I.GetPixel(X+1, Y))
I.DrawBox(color, X+1, Y, X+1, Y)
BadSpots+="[X+1],[Y]"
if(!I.GetPixel(X, Y+1))
I.DrawBox(color, X, Y+1, X, Y+1)
BadSpots+="[X],[Y+1]"
if(inside)
if(!I.GetPixel(X-1, Y))
I.DrawBox(color, X-1, Y, X-1, Y)
BadSpots+="[X-1],[Y]"
if(!I.GetPixel(X, Y-1))
I.DrawBox(color, X, Y-1, X, Y-1)
BadSpots+="[X],[Y-1]"
continue
return I
Problem description:
well i've been trying to figure out a way so that it would draw outlines over all the icon_states and i came up with the idea if using the icon_states() proc then using making a new icon of 1 of the icon_states and then drawing the outline around that. After all of that i would put that icon into the the icon im going to return. that might have sounded confusing to some people but anyway anyone know what i should do?
Generally, you wouldn't want to do this at runtime, though.