ID:1291272
 
(See the best response by Kaiochao.)
Offset an icon and maintain its offset after using icon.Blend()?

Example:
            var/icon/o = new(icon = icon, icon_state = icon_state)
var/icon/p = new(src.icon)
p.Blend(o, ICON_OVERLAY, y = -24)
src.icon = p


That's an example verb I made just for this post.

The y = -24 setting moves the overlayed icon down, but cuts off the parts of it that pass the original icon's icon box size. What I'm looking for is a way to do this WITHOUT that behavior, as Blend()'s settings don't work like pixel_x/y (even though I feel like they should).

Anyone have any ideas? Thanks.
Best response
Use an overlay?

You're gonna have to use pixel_x/y somewhere.
Yeah, unless you change the icon_size and keep the bounding box, it's going to be pretty hard to avoid overlays/underlays.
Another question: say I do change world.icon_size from the default, will I still be able to place bigger images/icons on the map without having to piece them together?
In response to FKI
world.icon_size is a misnomer. It really just means tile_size. In the map formats other than TILED_ICON_MAP, all atoms can have icons of any size.
In response to Kaiochao
Beautiful. Thanks for the info.
In response to Kaiochao
Pretty sure when using things like blend() it sets the icon to your icon size and cuts the rest, though. Would I be wrong in my statements?
In response to NNAAAAHH
Blend() keeps the original icon's size.

i.Blend() will stay at i's size.