bestRepresentation(for:context:hints:)
Returns the best representation of the image for the specified rectangle using the provided hints.
Declaration
func bestRepresentation(for rect: NSRect, context referenceContext: NSGraphicsContext?, hints: [NSImageRep.HintKey : Any]?) -> NSImageRep?Parameters
- rect:
The area of the image to return.
- referenceContext:
A graphics context. This value can be
nil. - hints:
An optional dictionary of hints that provide more context for selecting or generating a
CGImage, and may override properties of thereferenceContext. SeeImage Hint Dictionary Keysfor a summary of the possible key-value pairs.
Return Value
The image representation that most closely matches the specified criteria.