The alpha gain filter is used to alter the alpha channel of a single source. This operation is commonly applied before passing the source to the alpha compositor effect (see the class).
The following equation describes the alteration that is made to the source’s alpha channel:
newAlpha = bottomPin <= (gain*oldAlpha + offset) <= topPin
This means that to increase the alpha channel by a set amount, you set the property to 1.0, and the to the desired increase. Similarly, to increase the alpha channel by a fixed percentage, set the to 0.0 and the to the percentage increase desired. The and properties allow you to set upper and lower bounds on the value of the alpha channel, respectively. The alpha gain filter effect takes a maximum of one source.
The QTPlgEffectAlphaGainDesc class implements methods and properties to setup programmatically the parameters of the Alpha Gain effect filter provided natively by QuickTime.
→ → → →
The QTPlgEffectAlphaGainDesc class constructors are called when you create a new instance of the class, while the ˜QTPlgEffectAlphaGainDesc class destructor, is called automatically when the class is no more in use. Also, you can invoke the class destructor by setting the instance of the class to nil.
Once a new class instance is returned, it is good practice to check the class property to be sure that the new object can be used. For discussion about the validity of an effect description instance see the documentation relative to the .
The class provides you with the following initializer methods: