Instance Method

setScalesWhenResized:

Sets whether to scale different-sized image representations to fit the image's size.

Declaration

- (void)setScalesWhenResized:(BOOL)flag;

Parameters

flag

YES if image representations are scaled to fit; otherwise NO.

Discussion

Most images (especially those loaded from files and URLs) contain only a single image representation whose size is the same as the receiver. It is possible to add image representations using the addRepresentation: or addRepresentations: methods but doing so is rarely necessary because modern hardware is powerful enough to resize and scale images quickly. The only reason to consider creating new representations is if each representations contains a customized version of the image at a specific size. (TIFF images may also contain a thumbnail version of an image, which is stored using a separate image representation.) If you pass YES in the flag parameter, and subsequently assign a new value to the size property, all such image representations would be scaled to the same size. Scaling of bitmap images usually results in the interpolation of the bitmap data.

This method does not invalidate the caches of any of the receiver's image representations. The caches are not invalidated until you change the image size using the size property. Scaling affects only the cached offscreen data for a given image representation.

See Also

Deprecated Symbols

+ imageFileTypes

Returns an array of strings identifying the image types supported by the registered image representation objects.

Deprecated
+ imageUnfilteredFileTypes

Returns an array of strings identifying the file types supported directly by the registered image representation objects.

Deprecated
+ imagePasteboardTypes

Returns an array of strings identifying the pasteboard types supported directly by the registered image representation objects.

Deprecated
+ imageUnfilteredPasteboardTypes

Returns an array of strings identifying the pasteboard types supported directly by the registered image representation objects.

Deprecated
- lockFocusOnRepresentation:

Prepares the specified image representation to receive drawing commands.

Deprecated
- bestRepresentationForDevice:

Returns the best representation for the device with the specified characteristics.

Deprecated
- compositeToPoint:operation:

Composites the entire image to the specified point in the current coordinate system.

Deprecated
- compositeToPoint:fromRect:operation:

Composites a portion of the image to the specified point in the current coordinate system.

Deprecated
- compositeToPoint:fromRect:operation:fraction:

Composites a portion of the image at the specified opacity to the current coordinate system.

Deprecated
- compositeToPoint:operation:fraction:

Composites the entire image at the specified opacity in the current coordinate system.

Deprecated
- dissolveToPoint:fraction:

Composites the entire image to the specified location using the source-over operator.

Deprecated
- dissolveToPoint:fromRect:fraction:

Composites a portion of the image to the specified location using the source-over operator.

Deprecated
- scalesWhenResized

Returns a Boolean value indicating whether to scale image representations to fit the image's size.

Deprecated
- setDataRetained:

Sets whether the receiver retains its source image data.

Deprecated
- isDataRetained

Returns a Boolean value indicating whether the receiver retains its source image data.

Deprecated
- setCachedSeparately:

Sets whether each image representation uses a separate offscreen window to cache its contents.

Deprecated
- isCachedSeparately

Returns a Boolean value indicating whether each image representation caches its contents in a separate offscreen window.

Deprecated
- setCacheDepthMatchesImageDepth:

Sets whether the receiver's offscreen window caches use the same bit depth as the image data itself.

Deprecated
- cacheDepthMatchesImageDepth

Returns a Boolean value indicating whether an image's offscreen window caches use the same bit depth as the image data itself.

Deprecated
- setFlipped:

Sets whether the polarity of the y axis is inverted when drawing an image.

Deprecated
- isFlipped

Returns a Boolean value indicating whether the image uses a flipped coordinate system.

Deprecated