init(bitmapImageRep:)
Creates a new graphics context using the specified bitmap image representation object as the context destination.
Declaration
init?(bitmapImageRep bitmapRep: NSBitmapImageRep)Parameters
- bitmapRep:
The Nsbitmapimagerep object to use as the destination.
Return Value
The created NSGraphicsContext object, or nil if the object could not be created.
Discussion
This method accepts only single plane NSBitmapImageRep instances. It is the equivalent of using init(attributes:) and passing bitmapRep as the value for the dictionary’s destination key.