Be_Giant(mob/M as mob in world)
set desc = "Testing Scale Proc"
set category = "Testing"
var/bigme = input("Enter a multiplier","Giant Size Me") as null|num
var/icon/i = icon(M.icon)
i.Scale(bigme * i.Width(),bigme * i.Height())
M.icon = i
M.pixel_x = ((i.Width() - 32) / 2)*-1
The code above works fine. It asks the user for a number, it multiplies the user's icon size by that multiplier, and then sets their pixel_x to center them. That's not the issue I'm having.
I just noticed this but, the Developer Reference says the following...
"Scale() automatically performs antialiasing to avoid unwanted artifacts."
But it doesn't seem to do that when enlarging an icon. Only when shrinking it. If you increase the size of the icon, if its not a multiple of its current size, the icon will be distorted.
You get an effect like when you enlarge an icon in photoshop and use the preserve hard edges option where the pixels are stretched with no blending between them to smooth the transition.
That's increasing the icon's scale from 32x32 to 48x48
Doesn't really look like Anti-Aliasing to me?