fix to cameras failing to fetch colors

This commit is contained in:
9600bauds
2015-04-21 22:05:09 -03:00
parent a8d9693f51
commit 2bb03c4d4c

View File

@@ -152,6 +152,11 @@ proc/getFlatIcon(atom/A, dir, cache=1) // 1 = use cache, 2 = override cache, 0 =
if(isobserver(A)) if(isobserver(A))
add.ChangeOpacity(0.5) add.ChangeOpacity(0.5)
// Apply any color or alpha settings
if(I:color || I:alpha != 255)
var/rgba = (I:color || "#FFFFFF") + copytext(rgb(0,0,0,I:alpha), 8)
add.Blend(rgba, ICON_MULTIPLY)
// Find the new dimensions of the flat icon to fit the added overlay // Find the new dimensions of the flat icon to fit the added overlay
addX1 = min(flatX1, I:pixel_x+1) addX1 = min(flatX1, I:pixel_x+1)
addX2 = max(flatX2, I:pixel_x+add.Width()) addX2 = max(flatX2, I:pixel_x+add.Width())