Inherits from | |
Conforms to | |
Framework | /System/Library/Frameworks/QuartzCore.framework |
Availability | Available in Mac OS X v10.5 and later. |
Declared in | CAMediaTimingFunction.h |
Companion guides |
CAMediaTimingFunction
represents one segment of a function that defines the pacing of an animation as a timing curve. The function maps an input time normalized to the range [0,1] to an output time also in the range [0,1].
Creates and returns a new instance of CAMediaTimingFunction
timing function modeled as a cubic bezier curve using the specified control points.
+ (id)functionWithControlPoints:(float)c1x :(float)c1y :(float)c2x :(float)c2y
A floating point number representing the x position of the c1 control point.
A floating point number representing the y position of the c1 control point.
A floating point number representing the x position of the c2 control point.
A floating point number representing the y position of the c2 control point.
A new instance of CAMediaTimingFunction
with the timing function specified by the provided control points.
The end points of the bezier curve are automatically set to (0.0,0.0) and (1.0,1.0). The control points defining the bezier curve are: [(0.0,0.0), (c1x,c1y), (c2x,c2y), (1.0,1.0)].
CAMediaTimingFunction.h
Creates and returns a new instance of CAMediaTimingFunction
configured with the predefined timing function specified by name.
+ (id)functionWithName:(NSString *)name
The timing function to use as specified in “Predefined timing functions”
.
A new instance of CAMediaTimingFunction
with the timing function specified by name.
CAMediaTimingFunction.h
Returns the control point for the specified index.
- (void)getControlPointAtIndex:(size_t)index values:(float[2])ptr
An integer specifying the index of the control point to return.
A pointer to an array that, upon return, will contain the x and y values of the specified point.
The value of index must between 0 and 3.
CAMediaTimingFunction.h
Returns an initialized timing function modeled as a cubic bezier curve using the specified control points.
- (id)initWithControlPoints:(float)c1x :(float)c1y :(float)c2x :(float)c2y
A floating point number representing the x position of the c1 control point.
A floating point number representing the y position of the c1 control point.
A floating point number representing the x position of the c2 control point.
A floating point number representing the y position of the c2 control point.
An instance of CAMediaTimingFunction
with the timing function specified by the provided control points.
The end points of the bezier curve are automatically set to (0.0,0.0) and (1.0,1.0). The control points defining the bezier curve are: [(0.0,0.0), (c1x,c1y), (c2x,c2y), (1.0,1.0)].
CAMediaTimingFunction.h
These constants are used to specify one of the predefined timing functions used by functionWithName:
.
NSString * const kCAMediaTimingFunctionLinear; NSString * const kCAMediaTimingFunctionEaseIn; NSString * const kCAMediaTimingFunctionEaseOut; NSString * const kCAMediaTimingFunctionEaseInEaseOut;
kCAMediaTimingFunctionLinear
Specifies linear pacing. A linear pacing causes an animation to occur evenly over its duration.
Available in Mac OS X v10.5 and later.
Declared in CAMediaTimingFunction.h
.
kCAMediaTimingFunctionEaseIn
Specifies ease-in pacing. Ease-in pacing causes the animation to begin slowly, and then speed up as it progresses.
Available in Mac OS X v10.5 and later.
Declared in CAMediaTimingFunction.h
.
kCAMediaTimingFunctionEaseOut
Specifies ease-out pacing. An ease-out pacing causes the animation to begin quickly, and then slow as it completes.
Available in Mac OS X v10.5 and later.
Declared in CAMediaTimingFunction.h
.
kCAMediaTimingFunctionEaseInEaseOut
Specifies ease-in ease-out pacing. An ease-in ease-out animation begins slowly, accelerates through the middle of its duration, and then slows again before completing.
Available in Mac OS X v10.5 and later.
Declared in CAMediaTimingFunction.h
.
CAMediaTimingFunction.h
© 2008 Apple Inc. All Rights Reserved. (Last updated: 2008-07-11)