Class

IKImageView

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 for the NSFilenamesPboardType flavor 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.

Declaration

@interface IKImageView : NSView

Overview

You can provide an images for the view in any of these formats:

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.

Topics

Getting and Setting Image View Characteristics

delegate

Specifies the delegate object of the receiver.

zoomFactor

Specifies the zoom factor for the image view.

rotationAngle

Specifies the rotation angle for the image view.

currentToolMode

Specifies the current tool mode for the image view.

autoresizes

Specifies the automatic resizing state for the image view.

hasHorizontalScroller

Specifies the horizontal scroll bar state for the image view.

hasVerticalScroller

Specifies the vertical scroll bar state for the image view.

autohidesScrollers

Specifies the automatic-hiding scroll bar state for the image view.

supportsDragAndDrop

Specifies the drag-and-drop support state for the image view.

editable

Specifies the editable state for the image view.

doubleClickOpensImageEditPanel

Specifies the image-opening state of the editing pane in the image view.

imageCorrection

Specifies a Core Image filter for image correction.

backgroundColor

Specifies the background color for the image view.

- imageSize

Returns the size of the image in the image view.

- imageProperties

Returns the metadata for the image in the view.

Getting and Setting Images

- image

Returns the image associated with the view, after any image corrections.

- setImage:imageProperties:

Sets the image to display in an image view.

- setImageWithURL:

Initializes an image view with the image specified by a URL.

Manipulating the Image in a View

- setRotationAngle:centerPoint:

Sets the rotation angle at the provided origin.

- setImageZoomFactor:centerPoint:

Sets the zoom factor at the provided origin.

- zoomImageToFit:

Zooms the image so that it fits in the image view.

- zoomImageToActualSize:

Zooms the image so that it is displayed using its true size.

- zoomImageToRect:

Zooms the image so that it fits in the specified rectangle.

- zoomIn:

Zooms the image in.

- zoomOut:

Zooms the image out.

- crop:

Crops the image using the current selection.

- flipImageHorizontal:

Flips an image along the horizontal axis.

- flipImageVertical:

Flips an image along the vertical axis.

- rotateImageLeft:

Rotates the image left (counter-clockwise).

- rotateImageRight:

Rotates the image right (clockwise).

Working With Core Animation

- setOverlay:forType:

Sets an overlay type for a Core Animation layer.

- overlayForType:

Returns the Core Animation layer associated with a layer type.

Scrolling

- scrollToPoint:

Scrolls the view to the specified point.

- scrollToRect:

Scrolls the view so that it includes the provided rectangular area.

Converting Points and Rectangles

- convertViewPointToImagePoint:

Converts an image view coordinate to an image coordinate.

- convertViewRectToImageRect:

Converts an image view rectangle to an image rectangle.

- convertImagePointToViewPoint:

Converts an image coordinate to an image view coordinate.

- convertImageRectToViewRect:

Converts an image rectangle to an image view rectangle.

Constants

Tool Modes

Image Kit tools modes referenced by the currentToolMode property.

Relationships

Inherits From