|Type||Topic||Plugin||Version||macOS||Windows||Linux||Console & Web||iOS|
|class||Cocoa Drawing||MBS MacBase Plugin||7.2||Yes||No||No||Yes, macOS only||No|
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
- 2 methods
- shared method canInitWithData(data as memoryblock) as Boolean
- const NSImageRepMatchesDevice = 0
Some methods using this class:
- NSImageMBS.addRepresentation(img as NSImageRepMBS)
- NSImageMBS.removeRepresentation(img as NSImageRepMBS)
- NSImageMBS.representations as NSImageRepMBS()
Some examples which use this class:
- /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.
MBS Xojo blog