Contents
Navigation
Home User Reference Other Resources


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:
()
This is the default constructor. Use this constructor to create a completely new data descriptor container in memory.
(other as )
This is the copy constructor. The properties of the object to be copied will be used to initialize the new class instance properties. Note that the parameter passed is a generic object; this is due to the fact that you could use a descriptor obtained by the that returns a generic . Anyway, the class makes a control to check if the passed object is suitable for use and, if not, will initialize the class instance with default values

this value is multiplied by the original alpha channel value; along with the property below, determines the amount of alteration of the alpha channel. If you want to change the alpha channel by a set amount set this property to 1.0 and the to the desired value
this value is added to the old alpha channel, after it has been multiplied by the gain parameter; along with the property above, determines the amount of alteration of the alpha channel. If you want to change the alpha channel by a fixed percentage, set this property to 0.0 and the to the desired percentage value
determines the maximum value that the alpha channel can take after the and parameters have been applied
determines the minimum value that the alpha channel can take after the and parameters have been applied