Einhugur macOS Bridge plugin.

EinhugurMacOSBridge.NSImage Class (console safe)

Representation of macOS NSImage object.

The object has been wrapped to make it easy to us NSImage with Xojo API’s and Einhugur API’s.

The object can be used by it self, or with NSImage coming from Declare in Xojo, or with NSImage coming from 3rd party plugin (if they can provide Integer based handle to the NSImage).

The object will be automatically released like any other Xojo object. Do not manually use the Release method unless you have done something externally to the NSImage, with other plugin or declares that might call for release.

NSObject
   NSImage

class EinhugurMacOSBridge.NSImage

Constructors

NSImagePrivate constructor. This class can only be constructed with the Shared methods on the class.

Properties

HeightReturns height of the NSImage.
WidthReturns width of the NSImage.
Handle (Inherited) Returns Integer handle to the native NSObject structure.

Methods

DrawDraws the NSImage into Xojo Graphics object at given x,y location.
DrawDraws the NSImage into Xojo Graphics object at given x,y location, taking in additionally width and height parameters.
shared FromCGImageCreates NSImage from a given CGImage.
shared FromFileLoads image from contents of a file.
shared FromFileIconLoads image from a file or folder icon.
shared FromFileTypeLoads icon for given file type.
shared FromIntegerPtrConstructs NSImage object from Integer handle coming from declares or 3rd party plugin.
shared FromNamedImageReturns the image object associated with the specified name.
shared FromURLLoads image from a URL.
GetCGImageOfSizeGets representation of given Size and returns it as EinhugurMacOSBridge.CGImage.
Release (Inherited) Releases the NSObject.
Retain (Inherited) Retains the NSObject
ToPictureConverts the NSImage to Xojo picture object.

Supported Platforms:

  • MacOS X Cocoa 32 bit
  • MacOS X Cocoa 64 bit

    Unsupported Platforms:

  • MacOS X Carbon
  • Windows 32 bit
  • Windows 64 bit
  • Linux 32 bit
  • Linux 64 bit
  • Linux ARM