Class

QCView

The QCView class is a custom NSView class that loads, plays, and controls Quartz Composer compositions. It is an autonomous view that is driven by an internal timer running on the main thread.

Declaration

@interface QCView : NSView

Overview

The view can be set to render a composition automatically when it is placed onscreen. The view stops rendering when it is placed offscreen. When not rendering, the view is filled with the current erase color. The rendered composition automatically synchronizes to the vertical retrace of the monitor.

When you archive a QCView object, it saves the composition that’s loaded at the time the view is archived.

If you want to perform custom operations while a composition is rendering such as setting input parameters or drawing OpenGL content, you need to subclass QCView and implement the renderAtTime:arguments: method.

Topics

Performing Custom Operations During Rendering

- renderAtTime:arguments:

Overrides to perform your custom operations prior to or after rendering a frame of a composition.

Loading a Composition

- loadCompositionFromFile:

Loads the composition file located at the specified path.

- loadComposition:

Loads a QCComposition object into the view.

- loadedComposition

Returns the composition loaded in the view.

- unloadComposition

Unloads the composition from the view.

Managing the Erase Color

- erase

Clears the view using the current erase color.

- eraseColor

Retrieves the current color used to erase the view.

- setEraseColor:

Sets the color used to erase the view.

Setting and Getting Event Masks

- eventForwardingMask

Retrieves the mask used to filter which types of events are forwarded from the view to the composition during rendering.

- setEventForwardingMask:

Sets the mask used to filter which types of events are forwarded from the view to the composition during rendering.

Setting and Getting the Maximum Frame Rate

- maxRenderingFrameRate

Returns the maximum frame rate for rendering.

- setMaxRenderingFrameRate:

Sets the maximum rendering frame rate.

Managing Rendering

- startRendering

Starts rendering the composition that is in the view.

- isRendering

Checks whether a composition is rendering in the view.

- autostartsRendering

Checks whether the view is set to start rendering automatically.

- setAutostartsRendering:

Sets whether the composition that is in the view starts rendering automatically when the view is put on the screen.

- stopRendering

Stops rendering the composition that is in the view.

- pauseRendering

Pauses rendering in the view.

- isPausedRendering

Returns whether or not the rendering in the view is paused.

- resumeRendering

Resumes rendering a paused composition.

Using Interface Builder

- play:

Plays or pauses a composition in a view.

- start:

Starts rendering a composition in a view.

- stop:

Stops rendering a composition in a view.

Taking Snapshot Images

- snapshotImage

Returns an NSImage object of the current image in the view.

- createSnapshotImageOfType:

Returns the current image in the view as an image object of the provided image type.

Working With OpenGL

- openGLContext

Returns the OpenGL context used by the view.

- openGLPixelFormat

Returns the OpenGL pixel format used by the view.

Notifications

QCViewDidStartRenderingNotification

Posted when the view starts rendering.

QCViewDidStopRenderingNotification

Posted when the view stops rendering.

Relationships

Inherits From