pub trait NSImage: Sized {
Show 46 methods
// Required methods
unsafe fn initByReferencingFile_(self, file_name: id) -> id;
unsafe fn initWithContentsOfFile_(self, file_name: id) -> id;
unsafe fn initWithData_(self, data: id) -> id;
unsafe fn initWithDataIgnoringOrientation_(self, data: id) -> id;
unsafe fn initWithPasteboard_(self, pasteboard: id) -> id;
unsafe fn initWithSize_flipped_drawingHandler_(
self,
size: NSSize,
drawingHandlerShouldBeCalledWithFlippedContext: BOOL,
drawingHandler: *mut Block<(NSRect,), BOOL>
);
unsafe fn initWithSize_(self, aSize: NSSize) -> id;
unsafe fn name(self) -> id;
unsafe fn setName_(self, name: id) -> BOOL;
unsafe fn size(self) -> NSSize;
unsafe fn template(self) -> BOOL;
unsafe fn canInitWithPasteboard_(self, pasteboard: id) -> BOOL;
unsafe fn imageTypes(self) -> id;
unsafe fn imageUnfilteredTypes(self) -> id;
unsafe fn addRepresentation_(self, imageRep: id);
unsafe fn addRepresentations_(self, imageReps: id);
unsafe fn representations(self) -> id;
unsafe fn removeRepresentation_(self, imageRep: id);
unsafe fn bestRepresentationForRect_context_hints_(
self,
rect: NSRect,
referenceContext: id,
hints: id
) -> id;
unsafe fn prefersColorMatch(self) -> BOOL;
unsafe fn usesEPSOnResolutionMismatch(self) -> BOOL;
unsafe fn matchesOnMultipleResolution(self) -> BOOL;
unsafe fn drawInRect_(self, rect: NSRect);
unsafe fn drawAtPoint_fromRect_operation_fraction_(
self,
point: NSPoint,
srcRect: NSRect,
op: NSCompositingOperation,
delta: CGFloat
);
unsafe fn drawInRect_fromRect_operation_fraction_(
self,
dstRect: NSRect,
srcRect: NSRect,
op: NSCompositingOperation,
delta: CGFloat
);
unsafe fn drawInRect_fromRect_operation_fraction_respectFlipped_hints_(
self,
dstSpacePortionRect: NSRect,
srcSpacePortionRect: NSRect,
op: NSCompositingOperation,
delta: CGFloat,
respectContextIsFlipped: BOOL,
hints: id
);
unsafe fn drawRepresentation_inRect_(self, imageRep: id, dstRect: NSRect);
unsafe fn isValid(self) -> BOOL;
unsafe fn backgroundColor(self) -> id;
unsafe fn lockFocus(self);
unsafe fn lockFocusFlipped_(self, flipped: BOOL);
unsafe fn unlockFocus(self);
unsafe fn alignmentRect(self) -> NSRect;
unsafe fn cacheMode(self) -> NSImageCacheMode;
unsafe fn recache(self);
unsafe fn delegate(self) -> id;
unsafe fn TIFFRepresentation(self) -> id;
unsafe fn TIFFRepresentationUsingCompression_factor_(
self,
comp: NSTIFFCompression,
aFloat: f32
) -> id;
unsafe fn cancelIncrementalLoad(self);
unsafe fn hitTestRect_withImageDestinationRect_context_hints_flipped_(
self,
testRectDestSpace: NSRect,
imageRectDestSpace: NSRect,
referenceContext: id,
hints: id,
flipped: BOOL
) -> BOOL;
unsafe fn accessibilityDescription(self) -> id;
unsafe fn layerContentsForContentsScale_(
self,
layerContentsScale: CGFloat
) -> id;
unsafe fn recommendedLayerContentsScale_(
self,
preferredContentsScale: CGFloat
) -> CGFloat;
unsafe fn matchesOnlyOnBestFittingAxis(self) -> BOOL;
// Provided methods
unsafe fn alloc(_: Self) -> id { ... }
unsafe fn imageNamed_(_: Self, name: id) -> id { ... }
}