Get Flat Iconby DarkCampainger |
|
Flatten an atom's overlays and underlays into one icon file for output [More] |
To download this library for your Linux/Mac installation, enter this on your command line:
DreamDownload byond://DarkCampainger.GetFlatIcon##version=3 Emulator users, in the BYOND pager go to File | Open Location and enter this URL:byond://DarkCampainger.GetFlatIcon##version=3 |
Summary:Want to show your player's icon in the browser or output control? Frustrated that only their base icon--and none of their overlays or underlays--are included?Or maybe you want to fade a snapshot of the player in and out with atom.alpha, but don't like how all of the overlays fade separately? This library flattens any object's icon and overlays into a single dynamic icon at runtime. The icon can then easily be shown in a browser, output, or even a label! The library fully supports all types of overlays: icon files, icon states, objects, object types, images, dynamic icons, and images with dynamic icons. It correctly handles inheriting the icon, icon_state, dir*, color, and alpha from the base mob; as well as FLOAT_LAYER. It can even handle pixel_x/y values that move overlays outside of the base icon's bounds! As a cherry on top, the library has a fully functional cache, so you don't have to worry about keeping track of a reference to the flattened version of the icon. *Limitations:The library cannot distinguish between an overlay that inherits its direction from its parent and one that is set to face SOUTH. If an overlay's direction is set to SOUTH, the library will always assume it inherits from the parent.If an icon_state does not have the overlay's current dir (ie the state has only one direction in the icon file, but the overlay is not facing south or inherits a non-south direction from its parent) it will not show up in the flattened icon. This is a bug/limitation of icon/New(). Reference:Further documentation and a demo is included in the download, but to use this system, you just have to call one simple function:
|
Please support BYOND through Membership or a donation!
|
Related Libraries
|
|||||||||||||||||||||||||||||||||||
More Libraries by DarkCampainger
|
Copyright © 2025 BYOND Software.
All rights reserved.