Trait cocoa::appkit::NSImage

source ·
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 { ... }
}

Required Methods§

source

unsafe fn initByReferencingFile_(self, file_name: id) -> id

source

unsafe fn initWithContentsOfFile_(self, file_name: id) -> id

source

unsafe fn initWithData_(self, data: id) -> id

source

unsafe fn initWithDataIgnoringOrientation_(self, data: id) -> id

source

unsafe fn initWithPasteboard_(self, pasteboard: id) -> id

source

unsafe fn initWithSize_flipped_drawingHandler_( self, size: NSSize, drawingHandlerShouldBeCalledWithFlippedContext: BOOL, drawingHandler: *mut Block<(NSRect,), BOOL>, )

source

unsafe fn initWithSize_(self, aSize: NSSize) -> id

source

unsafe fn name(self) -> id

source

unsafe fn setName_(self, name: id) -> BOOL

source

unsafe fn size(self) -> NSSize

source

unsafe fn template(self) -> BOOL

source

unsafe fn canInitWithPasteboard_(self, pasteboard: id) -> BOOL

source

unsafe fn imageTypes(self) -> id

source

unsafe fn imageUnfilteredTypes(self) -> id

source

unsafe fn addRepresentation_(self, imageRep: id)

source

unsafe fn addRepresentations_(self, imageReps: id)

source

unsafe fn representations(self) -> id

source

unsafe fn removeRepresentation_(self, imageRep: id)

source

unsafe fn bestRepresentationForRect_context_hints_( self, rect: NSRect, referenceContext: id, hints: id, ) -> id

source

unsafe fn prefersColorMatch(self) -> BOOL

source

unsafe fn usesEPSOnResolutionMismatch(self) -> BOOL

source

unsafe fn matchesOnMultipleResolution(self) -> BOOL

source

unsafe fn drawInRect_(self, rect: NSRect)

source

unsafe fn drawAtPoint_fromRect_operation_fraction_( self, point: NSPoint, srcRect: NSRect, op: NSCompositingOperation, delta: CGFloat, )

source

unsafe fn drawInRect_fromRect_operation_fraction_( self, dstRect: NSRect, srcRect: NSRect, op: NSCompositingOperation, delta: CGFloat, )

source

unsafe fn drawInRect_fromRect_operation_fraction_respectFlipped_hints_( self, dstSpacePortionRect: NSRect, srcSpacePortionRect: NSRect, op: NSCompositingOperation, delta: CGFloat, respectContextIsFlipped: BOOL, hints: id, )

source

unsafe fn drawRepresentation_inRect_(self, imageRep: id, dstRect: NSRect)

source

unsafe fn isValid(self) -> BOOL

source

unsafe fn backgroundColor(self) -> id

source

unsafe fn lockFocus(self)

source

unsafe fn lockFocusFlipped_(self, flipped: BOOL)

source

unsafe fn unlockFocus(self)

source

unsafe fn alignmentRect(self) -> NSRect

source

unsafe fn cacheMode(self) -> NSImageCacheMode

source

unsafe fn recache(self)

source

unsafe fn delegate(self) -> id

source

unsafe fn TIFFRepresentation(self) -> id

source

unsafe fn TIFFRepresentationUsingCompression_factor_( self, comp: NSTIFFCompression, aFloat: f32, ) -> id

source

unsafe fn cancelIncrementalLoad(self)

source

unsafe fn hitTestRect_withImageDestinationRect_context_hints_flipped_( self, testRectDestSpace: NSRect, imageRectDestSpace: NSRect, referenceContext: id, hints: id, flipped: BOOL, ) -> BOOL

source

unsafe fn accessibilityDescription(self) -> id

source

unsafe fn layerContentsForContentsScale_( self, layerContentsScale: CGFloat, ) -> id

source

unsafe fn recommendedLayerContentsScale_( self, preferredContentsScale: CGFloat, ) -> CGFloat

source

unsafe fn matchesOnlyOnBestFittingAxis(self) -> BOOL

Provided Methods§

source

unsafe fn alloc(_: Self) -> id

source

unsafe fn imageNamed_(_: Self, name: id) -> id

Object Safety§

This trait is not object safe.

Implementors§