Up
Authors
- Adam Fedor (
fedor@colorado.edu
)
-
Load, manipulate and display images
Copyright: (C) 1996, 2005 Free Software Foundation, Inc.
- Declared in:
- AppKit/NSImage.h
- Conforms to:
- NSCoding
- NSCopying
Availability: OpenStep
Description forthcoming.
Instance Variables
Method summary
+ (
NSImage*)
_standardImageWithName: (
NSString*)name;
Availability: Not in OpenStep/MacOS-X
Warning the underscore at the start of the
name of this method indicates that it is
private, for internal use only, and you should not
use the method in your code.
+ (BOOL)
canInitWithPasteboard: (
NSPasteboard*)pasteboard;
Availability: OpenStep
Description forthcoming.
+ (
NSArray*)
imageFileTypes;
Availability: OpenStep
Description forthcoming.
+ (id)
imageNamed: (
NSString*)aName;
Availability: OpenStep
Returns the NSImage named aName. The
search is done in the main bundle first and then in
the usual images directories.
+ (
NSArray*)
imagePasteboardTypes;
Availability: OpenStep
Description forthcoming.
+ (
NSArray*)
imageUnfilteredFileTypes;
Availability: OpenStep
Description forthcoming.
+ (
NSArray*)
imageUnfilteredPasteboardTypes;
Availability: OpenStep
Description forthcoming.
- (
NSData*)
TIFFRepresentation;
Availability: OpenStep
Description forthcoming.
- (
NSData*)
TIFFRepresentationUsingCompression: (
NSTIFFCompression)comp
factor: (float)aFloat;
Availability: OpenStep
Description forthcoming.
- (void)
addRepresentation: (
NSImageRep*)imageRep;
Availability: OpenStep
Adds the NSImageRep
imageRep to the
NSImage's representations array.
See Also:
- (void)
addRepresentations: (
NSArray*)imageRepArray;
Availability: OpenStep
Adds the NSImageRep array
imageRepArray to
the NSImage's representations array.
See Also:
- (
NSColor*)
backgroundColor;
Availability: OpenStep
Returns the color of the NSImage's background.
See Also:
- (
NSImageRep*)
bestRepresentationForDevice: (
NSDictionary*)deviceDescription;
Availability: OpenStep
Finds the best representation for
deviceDescription. If
deviceDescription is nil
, it
guesses where drawing is taking place and finds the
best representation.
- (
NSImageRep*)
bestRepresentationForRect: (
NSRect)rect
context: (
NSGraphicsContext*)context
hints: (
NSDictionary*)deviceDescription;
Availability: MacOS-X 10.6.0
Finds the best representation for drawing in the
specified rect. context and
hints are currently ignored.
- (BOOL)
cacheDepthMatchesImageDepth;
Availability: OpenStep
Description forthcoming.
- (id)
delegate;
Availability: OpenStep
Description forthcoming.
- (void)
dissolveToPoint: (
NSPoint)aPoint
fraction: (
CGFloat)aFloat;
Availability: OpenStep
Description forthcoming.
- (void)
dissolveToPoint: (
NSPoint)aPoint
fromRect: (
NSRect)aRect
fraction: (
CGFloat)aFloat;
Availability: OpenStep
Description forthcoming.
- (void)
drawInRect: (
NSRect)dstRect
fromRect: (
NSRect)srcRect
operation: (
NSCompositingOperation)op
fraction: (
CGFloat)delta;
Availability: MacOS-X 10.0.0
Takes the part of the receiver given by
srcRect
and draws it in
dstRect
in the current
coordinate system, transforming the image as
necessary.
The image is drawn as if it was drawn to a cleared
window, then dissolved using the fraction
delta
to another cleared
window, and finally composited using
op
to the destination.
Note that compositing and dissolving doesn't work on
all devices (printers, in particular).
- (void)
drawInRect: (
NSRect)dstRect
fromRect: (
NSRect)srcRect
operation: (
NSCompositingOperation)op
fraction: (
CGFloat)delta
respectFlipped: (BOOL)respectFlipped
hints: (
NSDictionary*)hints;
Availability: MacOS-X 10.6.0
Base drawing method in NSImage; all other draw methods
call this one
We only use caching on backends
that can efficiently draw a rect from the cache onto
the current graphics context respecting the CTM, which
is currently cairo.
- (BOOL)
drawRepresentation: (
NSImageRep*)imageRep
inRect: (
NSRect)aRect;
Availability: OpenStep
Description forthcoming.
- (id)
initByReferencingFile: (
NSString*)fileName;
Availability: OpenStep
Initializes and returns a NSImage from the
NSString fileName.
- (id)
initWithBitmapHandle: (void*)bitmap;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (id)
initWithContentsOfFile: (
NSString*)fileName;
Availability: OpenStep
Initializes and returns a new NSImage from the
file
fileName.
fileName should
be an absolute path.
See Also:
- (id)
initWithContentsOfURL: (
NSURL*)anURL;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (id)
initWithData: (
NSData*)data;
Availability: OpenStep
Initializes and returns a new NSImage from the
NSData
data.
See Also:
- (id)
initWithIconHandle: (void*)icon;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (id)
initWithPasteboard: (
NSPasteboard*)pasteboard;
Availability: OpenStep
Initializes and returns a new NSImage from the
data in
pasteboard. The
pasteboard types can be whose defined in
[NSImageRep +imagePasteboardTypes]
or NSFilenamesPboardType
See Also:
- (id)
initWithSize: (
NSSize)aSize;
Availability: OpenStep
Initialize and returns a new NSImage with
aSize as specified size.
See Also:
- (BOOL)
isCachedSeparately;
Availability: OpenStep
Description forthcoming.
- (BOOL)
isDataRetained;
Availability: OpenStep
Description forthcoming.
- (BOOL)
isFlipped;
Availability: OpenStep
Description forthcoming.
- (BOOL)
isValid;
Availability: OpenStep
Description forthcoming.
- (void)
lockFocus;
Availability: OpenStep
Locks the focus on the best representation.
See Also:
- (void)
lockFocusOnRepresentation: (
NSImageRep*)imageRep;
Availability: OpenStep
Locks the focus in the imageRep. If
imageRep is nil
this method
locks the focus on the best representation.
- (BOOL)
matchesOnMultipleResolution;
Availability: OpenStep
Description forthcoming.
- (
NSString*)
name;
Availability: OpenStep
Returns the name of the receiver.
- (BOOL)
prefersColorMatch;
Availability: OpenStep
Returns YES
if color matching is the
preferred representation and NO
otherwise.
- (void)
recache;
Availability: OpenStep
Description forthcoming.
- (void)
removeRepresentation: (
NSImageRep*)imageRep;
Availability: OpenStep
Remove the NSImageRep
imageRep from the
NSImage's representations array
See Also:
- (
NSArray*)
representations;
Availability: OpenStep
Description forthcoming.
- (BOOL)
scalesWhenResized;
Availability: OpenStep
Description forthcoming.
- (void)
setBackgroundColor: (
NSColor*)aColor;
Availability: OpenStep
Sets the color of the NSImage's background to
aColor.
See Also:
- (void)
setCacheDepthMatchesImageDepth: (BOOL)flag;
Availability: OpenStep
Description forthcoming.
- (void)
setCacheMode: (
NSImageCacheMode)mode;
Availability: OpenStep
Description forthcoming.
- (void)
setCachedSeparately: (BOOL)flag;
Availability: OpenStep
Description forthcoming.
- (void)
setDataRetained: (BOOL)flag;
Availability: OpenStep
Description forthcoming.
- (void)
setDelegate: (id)anObject;
Availability: OpenStep
Description forthcoming.
- (void)
setFlipped: (BOOL)flag;
Availability: OpenStep
Description forthcoming.
- (void)
setMatchesOnMultipleResolution: (BOOL)flag;
Availability: OpenStep
Description forthcoming.
- (BOOL)
setName: (
NSString*)aName;
Availability: OpenStep
Sets aName as the name of the receiver.
- (void)
setPrefersColorMatch: (BOOL)flag;
Availability: OpenStep
Sets the preferred representation of a NSImage.
See Also:
- (void)
setScalesWhenResized: (BOOL)flag;
Availability: OpenStep
Description forthcoming.
- (void)
setSize: (
NSSize)aSize;
Availability: OpenStep
Sets the NSImage size to
aSize. Changing
the size recreate the cache.
See Also:
- (void)
setUsesEPSOnResolutionMismatch: (BOOL)flag;
Availability: OpenStep
Description forthcoming.
- (
NSSize)
size;
Availability: OpenStep
Returns NSImage size if the size have been set.
Returns the size of the best representation
otherwise.
See Also:
- (void)
unlockFocus;
Availability: OpenStep
Unlocks the focus on the receiver.
See Also:
- (BOOL)
usesEPSOnResolutionMismatch;
Availability: OpenStep
Description forthcoming.
Instance Variables for NSImage Class
@protected NSImageCacheMode _cacheMode;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSColor* _color;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected id _delegate;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSString* _fileName;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSView* _lockedView;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSString* _name;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSMutableArray* _reps;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSSize _size;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected struct __imageFlags struct __imageFlags;
Availability: OpenStep
Description forthcoming.
- Declared in:
- AppKit/NSImage.h
Availability: OpenStep
Description forthcoming.
Method summary
- (
NSString*)
pathForImageResource: (
NSString*)name;
Availability: OpenStep
Description forthcoming.
- Declared in:
- AppKit/NSImage.h
Availability: Not in OpenStep/MacOS-X
Description forthcoming.
Method summary
- (
NSImage*)
imageDidNotDraw: (id)sender
inRect: (
NSRect)aRect;
Availability: Not in OpenStep/MacOS-X
Description forthcoming.
Up