| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/Quartz.framework/Frameworks/QuartzComposer.framework |
| Availability | Available in Mac OS X v10.5 and later. |
| Companion guide | |
| Declared in | QCComposition.h QCCompositionRepository.h |
The QCComposition class represents a Quartz Composer composition that either:
comes from the system-wide composition repository (/Library/Compositions and ~/Library/Compositions) where it can be accessed by any application through the methods of the QCCompositionRepository class
is created from an arbitrary source (typically a file on disk) using one of its methods
This class cannot be subclassed.
A QCComposition object has the following information associated with it and that you can obtain by using the appropriate method of the QCComposition class:
Attributes include the name and description of the composition, copyright information, and whether or not its provided by Mac OS X (built-in).
The protocols that the composition conforms to. A composition protocol defines a set of required and optional input parameters and output results.
Many methods of the QCRenderer, QCCompositionLayer, and QCView classes take a QCComposition object as a parameter.
Returns an autoreleased composition object initialized with the contents of a Quartz Composer composition file.
+ (QCComposition*) compositionWithData:(NSData*)data;
The contents of a file created with the Quartz Composer developer tool.
A Quartz Composer composition object or nil if there is an error.
QCComposition.hReturns an autoreleased composition object initialized with a Quartz Composer composition file.
+ (QCComposition*) compositionWithFile:(NSString*)path;
A path to a file created with the Quartz Composer developer tool (.qtz extension).
A Quartz Composer composition object or nil if there is an error.
QCComposition.hReturns the attributes of the composition.
- (NSDictionary*) attributes
A dictionary of composition attributes. See “Attribute Keys” for the attributes that can be returned.
QCComposition.hReturns the unique and persistent identifier for the composition from the composition repository.
- (NSString*) identifier
The unique identifier for the composition if it comes from the composition repository; nil otherwise.
QCCompositionRepository.hReturns an array listing the keys that identify the input ports of the root patch of the composition.
- (NSArray*) inputKeys
An array of input keys.
QCComposition.hReturns an array listing the keys that identify the output ports of the root patch of the composition.
- (NSArray*) outputKeys
An array of output keys.
QCComposition.hReturns the list of protocols to which the composition conforms.
- (NSArray*) protocols
A list of protocols. See “Standard Protocols”.
QCComposition.hAttributes of a composition.
extern NSString* const QCCompositionAttributeNameKey; extern NSString* const QCCompositionAttributeDescriptionKey; extern NSString* const QCCompositionAttributeCopyrightKey; extern NSString* const QCCompositionAttributeBuiltInKey; extern NSString* const QCCompositionAttributeTimeDependentKey; extern NSString* const QCCompositionAttributeHasConsumersKey; extern NSString* const QCCompositionAttributeCategoryKey;
QCCompositionAttributeNameKeyThe key for the composition name. The associated value is an NSString object.
Available in Mac OS X v10.4 and later.
Declared in QCComposition.h.
QCCompositionAttributeDescriptionKeyThe key for the composition description. The associated value is an NSString object.
Available in Mac OS X v10.4 and later.
Declared in QCComposition.h.
QCCompositionAttributeCopyrightKeyThe key for composition copyright information. The associated value is an NSString object.
Available in Mac OS X v10.4 and later.
Declared in QCComposition.h.
QCCompositionAttributeBuiltInKeyThe key for the composition origin. The associated value is an NSNumber object that contains a Boolean value. YES indicates the composition is built-in (provided by Mac OS X).
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCCompositionAttributeTimeDependentKeyThe key for the composition time dependency. The associated value is an NSNumber object that contains a Boolean value. YES indicates that the composition is time dependent.
QCCompositionAttributeHasConsumersKeyThe key for a composition that has consumer patches. The associated value is an NSNumber object that contains a Boolean value. YES indicates that the composition has consumers.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCCompositionAttributeCategoryKeyThe composition category. The associated value is a category constant. See “Composition Categories.”
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCComposition.hCategories for compositions.
extern NSString* const QCCompositionCategoryDistortion; extern NSString* const QCCompositionCategoryStylize; extern NSString* const QCCompositionCategoryUtility;
QCCompositionCategoryDistortionA composition that produces a distortion effect.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCCompositionCategoryStylizeA composition that produces a stylize effect.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCCompositionCategoryUtilityA utility composition.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCComposition.hInput ports of a composition.
extern NSString* const QCCompositionInputImageKey; extern NSString* const QCCompositionInputSourceImageKey; extern NSString* const QCCompositionInputDestinationImageKey; extern NSString* const QCCompositionInputRSSFeedURLKey; extern NSString* const QCCompositionInputRSSArticleDurationKey; extern NSString* const QCCompositionInputPreviewModeKey; extern NSString* const QCCompositionInputXKey; extern NSString* const QCCompositionInputYKey; extern NSString* const QCCompositionInputScreenImageKey; extern NSString* const QCCompositionInputAudioPeakKey; extern NSString* const QCCompositionInputAudioSpectrumKey; extern NSString* const QCCompositionInputTrackPositionKey; extern NSString* const QCCompositionInputTrackInfoKey; extern NSString* const QCCompositionInputTrackSignalKey; extern NSString* const QCCompositionInputPrimaryColorKey; extern NSString* const QCCompositionInputSecondaryColorKey; extern NSString* const QCCompositionInputPaceKey;
QCCompositionInputImageKeyAn image input port whose key is inputImage.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCCompositionInputSourceImageKeyAn image input port whose key is inputSourceImage.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCCompositionInputDestinationImageKeyAn image input port whose key is inputDestinationImage.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCCompositionInputRSSFeedURLKeyA string input port whose key is inputRSSFeedURL. This port must be passed an http or feed scheme URL.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCCompositionInputRSSArticleDurationKeyA number input port whose key is inputRSSArticleDuration. The value must be expressed in seconds.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCCompositionInputPreviewModeKeyA Boolean input port whose key is inputPreviewMode. When the value of this input port is set to TRUE, the composition that provides this port must be able to run in a low-quality mode that produces a preview of the composition.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCCompositionInputXKeyA number input port whose key is inputX. The value must be normalized to the image width with the origin on the left.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCCompositionInputYKeyA number input port whose key is inputY. The value must be normalized to the image height with the origin at the bottom.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCCompositionInputScreenImageKeyAn image input port whose key is inputScreenImage.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCCompositionInputAudioPeakKeyA number input port whose key is inputAudioPeak. The value must be in the [0,1] range as a mono signal with no decay applied.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCCompositionInputAudioSpectrumKeyA structure input port whose key is inputAudioSpectrum. The structure must contain 16 values in the [0,1] range representing 16 spectrum bands of the mono signal from low to high frequencies with no decay applied.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCCompositionInputTrackPositionKeyA number input port whose key is inputTrackPosition. The value must be expressed in seconds.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCCompositionInputTrackInfoKeyA structure input port whose key is inputTrackInfo. The structure contains optional entries, such as “name”, “artist”, "album", "duration", "artwork", and so on.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCCompositionInputTrackSignalKeyA Boolean input port whose key is inputTrackSignal.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCCompositionInputPrimaryColorKeyA color input port whose key is inputPrimaryColor.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCCompositionInputSecondaryColorKeyA color input port whose key is inputSecondaryColor.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCCompositionInputPaceKeyA number input port whose key is inputPace. The value must be in the [0,1] range.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCComposition.hOutput ports of a composition.
extern NSString* const QCCompositionOutputImageKey; extern NSString* const QCCompositionOutputWebPageURLKey;
QCCompositionOutputImageKeyAn image output port whose key is outputImage.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCCompositionOutputWebPageURLKeyA string output port whose key is outputWebPageURL.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCComposition.hProtocols for a composition.
extern NSString* const QCCompositionProtocolGraphicAnimation; extern NSString* const QCCompositionProtocolGraphicTransition; extern NSString* const QCCompositionProtocolImageFilter; extern NSString* const QCCompositionProtocolImageCompositor; extern NSString* const QCCompositionProtocolImageTransition; extern NSString* const QCCompositionProtocolScreenSaverRSS;
QCCompositionProtocolGraphicAnimationA composition that renders a generic graphical animation. It has the option to use QCCompositionInputPrimaryColorKey for the primary color of the animation, QCCompositionInputSecondaryColorKey for the secondary color of the animation, QCCompositionInputPaceKey for the global pace of the animation, and QCCompositionInputPreviewModeKey to indicate if the animation should run in lower-quality for preview purposes.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCCompositionProtocolGraphicTransitionA composition that performs a transition between two images, using a transition time in range of 0 to 1. A conforming composition must use the input keys QCCompositionInputSourceImageKey for the starting image and QCCompositionInputDestinationImageKey for the image to transition to. The composition can optionally use QCCompositionInputPreviewModeKey to indicate if the animation should run in lower-quality for preview purposes.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCCompositionProtocolImageFilterA composition that applies an effect to a source image. A conforming composition must use the input key QCCompositionInputImageKey for the source image and QCCompositionOutputImageKey for the output image. The composition can optionally use QCCompositionInputXKey to specify the X position of the center point of the effect, QCCompositionInputYKey to specify the Y position of the center point of the effect, andQCCompositionInputPreviewModeKey to indicate if the animation should run in lower-quality for preview purposes.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCCompositionProtocolScreenSaverA composition that can be used as a screen saver. The composition has the option to use QCCompositionInputScreenImageKey for a screenshot image of the screen that the screen saver runs on, QCCompositionInputPreviewModeKey to indicate if the animation should run in lower-quality for preview purposes, and QCCompositionOutputWebPageURLKey for a URL to open in the default web browser when screen saver exits (only allowed if screen saver password is disabled).
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCCompositionProtocolImageTransitionA composition that performs a transition between two images, using a parametric time value to drives the transition from start (at time 0) to end (at time 1). A conforming composition must use the input keys QCCompositionInputImageKey for the starting image and QCCompositionInputDestinationImageKey for the ending image. The composition can optionally use QCCompositionInputPreviewModeKey to indicate if the animation should run in lower-quality for preview purposes.
QCCompositionProtocolRSSVisualizerA composition that acts as a visualizer for an RSS feed. A conforming composition must use the input key QCCompositionInputRSSFeedURLKey for the URL to use for the RSS feed. It can optionally use QCCompositionInputRSSArticleDurationKey to specify the duration of each feed article.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCCompositionProtocolMusicVisualizerA composition that acts as a visualizer for music. A conforming composition must use the input key QCCompositionInputAudioPeakKey for the instantaneous audio peak and the QCCompositionInputAudioSpectrumKey for the instantaneous audio spectrum. It can optionally use the QCCompositionInputTrackInfoKey to indicate it receives information about the current track and the QCCompositionInputTrackSignalKey to indicate the start of a new track.
Available in Mac OS X v10.5 and later.
Declared in QCComposition.h.
QCComposition.h
© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-06-26)