Platforms to show: All Mac Windows Linux Cross-Platform
NSAdaptiveImageGlyphMBS class New in 25.1
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Cocoa Text | MBS MacBase Plugin | 25.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
An NSAdaptiveImageGlyph contains an image that automatically adapts to different sizes and resolutions. The text system creates instances of this type to represent custom emojis that people create using the system interfaces. This type manages multiple images, along with metadata describing how to adapt those images correctly to different fonts and font attributes.
Typically, you receive new NSAdaptiveImageGlyph objects only from the text-input system. When someone creates a new emoji and inserts it into their text, TextKit creates an instance of this type to represent it. If your app examines or changes the attributes of attributed strings, preserve the adaptiveImageGlyph attribute in Swift or the NSAdaptiveImageGlyphAttributeName attribute in Objective-C when making any changes. For example, if you filter unknown attributes in a custom text-storage object, update your code to preserve this attribute. The value of the attribute is an NSAdaptiveImageGlyph containing the emoji data. You can save the image data with the rest of your content and use the data to recreate the type later.
Also used for genmoji.
- 5 properties
- property attributedString as NSAttributedStringMBS
- property contentDescription as String
- property contentIdentifier as String
- property Handle as Integer
- property imageContent as MemoryBlock
- shared property contentType as String
- 4 methods
- method Constructor(Data as MemoryBlock)
- method copy as NSAdaptiveImageGlyphMBS
- method imageForProposedSize(proposedSizeWidth as Double, proposedSizeHeight as Double, ScaleFactor as Double = 2) as NSAdaptiveImageGlyphImageMBS
- method insert(control as Variant, replacementRange as NSRangeMBS)
This class has no sub classes.
Blog Entries
Release notes
- Version 25.1
- Added NSAdaptiveImageGlyphMBS and NSAdaptiveImageGlyphImageMBS classes for genmojis.
Some methods using this class:
- NSAttributedStringMBS.attributedStringWithAdaptiveImageGlyph(adaptiveImageGlyph as NSAdaptiveImageGlyphMBS, withAttributes as dictionary) as NSAttributedStringMBS
Some properties using for this class:
- NSAdaptiveImageGlyphImageMBS.Glyph as NSAdaptiveImageGlyphMBS
Some related classes:
The items on this page are in the following plugins: MBS MacBase Plugin.
NSAdaptiveImageGlyphImageMBS - NSAffineTransformMBS
