Platforms to show: All Mac Windows Linux Cross-Platform
NSImageRepMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Cocoa Drawing | MBS MacBase Plugin | 7.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Each of its subclasses knows how to draw an image from a particular kind of source data. While an NSImageRep subclass can be used directly, it is typically through an NSImage object. An NSImage object manages a group of image representations, choosing the best one for the current output device.
Subclasses are not implemented in the plugin currently.
All methods in this class will catch exceptions from Cocoa and raise a NSExceptionMBS instead. Using the message, name and reason properties you can see what was the reason for this exception. Please report if you find a method which does not handle exceptions correct.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.
- 10 properties
- property bitsPerSample as Integer
- property colorSpaceName as String
- property Handle as Integer
- property hasAlpha as Boolean
- property height as Double
- property isOpaque as Boolean
- property pixelsHigh as Integer
- property pixelsWide as Integer
- property size as NSSizeMBS
- property width as Double
- 2 methods
- method Constructor Private
- method setSize(width as Double, height as Double)
- shared method canInitWithData(data as memoryblock) as Boolean
Constants
Constant | Value | Description |
---|---|---|
NSImageRepMatchesDevice | 0 | One of the constants used by NSImageRep to denote an attribute whose value changes to match the display device. Indicates that the value of certain attributes, such as the number of colors or bits per sample, will change to match the display device. more |
Sub classes:
Some methods using this class:
- NSImageMBS.addRepresentation(img as NSImageRepMBS)
- NSImageMBS.removeRepresentation(img as NSImageRepMBS)
- NSImageMBS.representations as NSImageRepMBS()
Some examples using this class:
- /MacBase/ConvertToSRGB
- /MacCocoa/Drop file to see icon parts
- /MacCocoa/NSWorkSpace DropFile to see icon parts
- /MacCocoa/NSWorkSpace Icon Images
- /MacControls/Toolbar/Toolbar with retina Icons
The items on this page are in the following plugins: MBS MacBase Plugin.
NSImageMBS - NSImageSymbolConfigurationMBS