Inherits from | |
Conforms to | |
Framework | System/Library/Frameworks/Quartz.framework/ImageKit.framework |
Availability | Available in Mac OS X v10.5 and later. |
Declared in | IKImageView.h |
The IKImageView
class provides an efficient way to display images in a view while at the same time supporting a number of image editing operations such as rotating, zooming, and cropping. It supports drag and drop, so that the user can drag an image to the view. If possible, image rendering uses hardware acceleration to achieve optimal performance. The IKImageView
class is implemented as a subclass of NSView
. Similar to NSImageView
, the IKImageView
class is used to display a single image.
You can provide an images for the view in any of these formats:
Image (NSImage
, CGImageRef
, or CIImage
)
Providing a file reference is the preferred way to set the the image for a view because in addition to the actual image data, IKImageView
also handles the image metadata embedded in the file. The image view automatically fetches the metadata from a file reference, whereas for the other sources (except for a CGImageSourceRef
source), it cannot. For images set from other sources, you need to set the metadata separately.
IKImageView
supports multi-frame images (TIFF, GIF, and so forth) and animated images.
delegate
property
zoomFactor
property
rotationAngle
property
currentToolMode
property
autoresizes
property
hasHorizontalScroller
property
hasVerticalScroller
property
autohidesScrollers
property
supportsDragAndDrop
property
editable
property
doubleClickOpensImageEditPanel
property
imageCorrection
property
backgroundColor
property
– imageSize
– imageProperties
– setRotationAngle:centerPoint:
– setImageZoomFactor:centerPoint:
– zoomImageToFit:
– zoomImageToActualSize:
– zoomImageToRect:
– flipImageHorizontal:
– flipImageVertical:
– convertViewPointToImagePoint:
– convertViewRectToImageRect:
– convertImagePointToViewPoint:
– convertImageRectToViewRect:
For more about Objective-C properties, see “Properties” in The Objective-C 2.0 Programming Language.
Specifies the automatic-hiding scroll bar state for the image view.
@property BOOL autohidesScrollers;
IKImageView.h
Specifies the automatic resizing state for the image view.
@property BOOL autoresizes;
IKImageView.h
Specifies the background color for the image view.
@property NSColor * backgroundColor;
IKImageView.h
Specifies the current tool mode for the image view.
@property NSString* currentToolMode;
IKImageView.h
Specifies the delegate object of the receiver.
@property id delegate;
An IKImageView object’s delegate is inserted in the responder chain after the image view itself and is informed of various actions by the image view through delegation messages.
IKImageView.h
Specifies the image-opening state of the editing pane in the image view.
@property BOOL doubleClickOpensImageEditPanel;
IKImageView.h
Specifies the editable state for the image view.
@property BOOL editable;
IKImageView.h
Specifies the horizontal scroll bar state for the image view.
@property BOOL hasHorizontalScroller;
IKImageView.h
Specifies the vertical scroll bar state for the image view.
@property BOOL hasVerticalScroller;
IKImageView.h
Specifies a Core Image filter for image correction.
@property CIFilter * imageCorrection;
IKImageView.h
Specifies the rotation angle for the image view.
@property CGFloat rotationAngle;
IKImageView.h
Specifies the drag-and-drop support state for the image view.
@property BOOL supportsDragAndDrop;
IKImageView.h
Specifies the zoom factor for the image view.
@property CGFloat zoomFactor;
IKImageView.h
Converts an image coordinate to an image view coordinate.
- (NSPoint)convertImagePointToViewPoint: (NSPoint)imagePoint;
A point specified in coordinates relative to the image.
A point specified in coordinates relative to the image view.
IKImageView.h
Converts an image rectangle to an image view rectangle.
- (NSRect)convertImageRectToViewRect: (NSRect)imageRect;
An rectangle specified in coordinates relative to the image.
An rectangle specified in coordinates relative to the image view.
IKImageView.h
Converts an image view coordinate to an image coordinate.
- (NSPoint)convertViewPointToImagePoint: (NSPoint)viewPoint;
A point specified in coordinates relative to the image view.
The point specified in coordinates relative to the image.
IKImageView.h
Converts an image view rectangle to an image rectangle.
- (NSRect)convertViewRectToImageRect: (NSRect)viewRect;
An rectangle specified in coordinates relative to the image view.
The rectangle specified in coordinates relative to the image.
IKImageView.h
Flips an image along the horizontal axis.
- (void)flipImageHorizontal: (id)sender;
The object initiating the action.
IKImageView.h
Flips an image along the vertical axis.
- (void)flipImageVertical: (id)sender;
The object initiating the action.
IKImageView.h
Returns the image associated with the view, after any image corrections.
- (CGImageRef)image;
The image.
IKImageView.h
Returns the metadata for the image in the view.
- (NSDictionary*)imageProperties;
A dictionary of metadata that specifies the image properties.
IKImageView.h
Returns the size of the image in the image view.
- (NSSize)imageSize;
The size of the image.
The image size changes whenever an image is rotates or cropped.
IKImageView.h
Returns the Core Animation layer associated with a layer type.
- (CALayer*)overlayForType: (NSString*)layerType;
A layer type. See “Overlay Types”
.
The Core Animation layer.
IKImageView.h
Scrolls the view to the specified point.
- (void)scrollToPoint:(NSPoint)point;
The point to scroll to.
IKImageView.h
Scrolls the view so that it includes the provided rectangular area.
- (void)scrollToRect:(NSRect)rect;
The rectangular area to include in the view.
IKImageView.h
Sets the image to display in an image view.
- (void)setImage: (CGImageRef)image imageProperties: (NSDictionary*)metaData;
The image to set.
A dictionary that contains metadata that describes the image.
IKImageView.h
Initializes an image view with the image specified by a URL.
- (void)setImageWithURL: (NSURL*)url;
The URL that specifies the location of the image.
This method is the preferred initializer for RAW images. If you use this method for a TIFF file that contains multiple images, only the first image is displayed.
IKImageView.h
Sets the zoom factor at the provided origin.
- (void)setImageZoomFactor: (CGFloat)zoomFactor centerPoint: (NSPoint)centerPoint;
The zoom factor to apply to the image.
The point that specifies the origin of the zoom factor.
IKImageView.h
Sets an overlay type for a Core Animation layer.
- (void)setOverlay: (CALayer*)layer forType: (NSString*)layerType;
A Core Animation layer object.
A layer type. See “Overlay Types”
.
IKImageView.h
Sets the rotation angle at the provided origin.
- (void)setRotationAngle: (CGFloat)rotationAngle centerPoint: (NSPoint)centerPoint;
The rotation angle to apply to the image.
The point that specifies the origin of the rotation angle.
IKImageView.h
Zooms the image so that it is displayed using its true size.
- (void)zoomImageToActualSize: (id)sender;
The object initiating the action.
IKImageView.h
Zooms the image so that it fits in the image view.
- (void)zoomImageToFit: (id)sender;
The object initiating the action.
IKImageView.h
Zooms the image so that it fits in the specified rectangle.
- (void)zoomImageToRect: (NSRect)rect;
The rectangle to fit the image in.
IKImageView.h
Image Kit tools modes.
NSString *const IKToolModeMove; NSString *const IKToolModeSelect; NSString *const IKToolModeCrop; NSString *const IKToolModeRotate; NSString *const IKToolModeAnnotate;
IKToolModeMove
The move tool.
Available in Mac OS X v10.5 and later.
Declared in IKImageView.h
.
IKToolModeSelect
The selection tool.
Available in Mac OS X v10.5 and later.
Declared in IKImageView.h
.
IKToolModeCrop
The crop tool.
Available in Mac OS X v10.5 and later.
Declared in IKImageView.h
.
IKToolModeRotate
The rotation tool.
Available in Mac OS X v10.5 and later.
Declared in IKImageView.h
.
IKToolModeAnnotate
The annotation tool.
Available in Mac OS X v10.5 and later.
Declared in IKImageView.h
.
IKImageView.h
A layer level.
NSString *const IKOverlayTypeBackground; NSString *const IKOverlayTypeImage;
IKOverlayTypeBackground
A background.
Available in Mac OS X v10.5 and later.
Declared in IKImageView.h
.
IKOverlayTypeImage
An image.
Available in Mac OS X v10.5 and later.
Declared in IKImageView.h
.
IKImageView.h
© 2008 Apple Inc. All Rights Reserved. (Last updated: 2008-04-08)