ID:2407101
 
(See the best response by Nadrew.)
Code:
for(var/a in usr.Over) //Over is a list of overlays
var/l = copytext("[a]",-3) //To separate obj overlays from icon overlays
if(l=="dmi")
var/icon/i = new(a)
i.Scale(64,64)
i.Shift(WEST,16) //To line up the overlay with the icon
usr.OverAki.Add(i) //A separate list of the temp icon overlays being created
usr.overlays+=i


Problem description:
I am creating a move that multiples the size of a user and their overlays. Everything is scaling correctly however all overlays that are shifted beyond the left of the icon are cut off.

Here is a picture: https://ibb.co/ftYc5q

Yes, use matrix scaling. Icon operation scaling is slow and has a lot of extra work involved for accomplishing the same result
In response to Nadrew
Nadrew wrote:
Yes, use matrix scaling. Icon operation scaling is slow and has a lot of extra work involved for accomplishing the same result

This looks frightening lol. Do we have any useful documentation on matrices beyond the Help reference within DM? I'll go look around in the developer section of the website.
Best response
mob
verb
GetBig()
var/matrix/m = matrix()
m.Scale(2)
usr.transform = m
// You can also animate() the scaling like so
// animate(usr,transform=m,time=10)

NormalSize()
usr.transform = null


You'd likely also want to set the PIXEL_SCALE appearance_flag value for things you'll be scaling up this way, which will do nearest neighbor interpolation instead of blending pixels and anti-aliasing.


No need to worry about overlays and the sort, transforms are client-side rendering post processing, so the server is only really aware that the transform variable was changed, the client handles the scaling.
Nadrew, last night for 4 hours I struggled to get this to work AND HERE YOU ARE WITH THE MOST SIMPLE ANSWER. I guess it's just a testament that programming doesn't need to be made difficult and I probably need to learn ALL the tools I've been given.

Does this also scale bound variables as well or will that need to be done manually?
It's entirely visual, you'd need to adjust bounds manually.