Instance Method

bitmapImageRepForCachingDisplayInRect:

Returns a bitmap-representation object suitable for caching the specified portion of the view.

Declaration

- (NSBitmapImageRep *)bitmapImageRepForCachingDisplayInRect:(NSRect)rect;

Parameters

aRect

A rectangle defining the area of the view to be cached.

Return Value

An autoreleased NSBitmapImageRep object or nil if the object could not be created.

Discussion

Passing the visible rectangle of the view ([self visibleRect]) returns a bitmap suitable for caching the current contents of the view, including all of its descendants.

See Also

Drawing

- updateLayer

Updates the view’s content by modifying its underlying layer.

- drawRect:

Overridden by subclasses to draw the view’s image within the specified rectangle.

canDraw

A Boolean value indicating whether drawing commands will produce any results.

Deprecated
canDrawConcurrently

A Boolean value indicating whether the view can draw its contents on a background thread.

visibleRect

The portion of the view that is not clipped by its superviews.

- getRectsBeingDrawn:count:

Returns by indirection a list of nonoverlapping rectangles that define the area the view is being asked to draw in drawRect:.

- needsToDrawRect:

Returns a Boolean value indicating whether the specified rectangle intersects any part of the area that the view is being asked to draw.

wantsDefaultClipping

A Boolean value indicating whether AppKit’s default clipping behavior is in effect.

- cacheDisplayInRect:toBitmapImageRep:

Draws the specified area of the view, and its descendants, into a provided bitmap-representation object.