Alpha
Top  Previous  Next

Description

Shows/hides the alpha plane over the live video.

Syntax


[VB]
objActiveGige.Alpha [= Value]


[C/C++]
HRESULT get_Alpha ( bool *pAlpha );
HRESULT put_Alpha( bool Alpha );


Data Type
[VB]

Boolean

Parameters
[C/C++]

pAlpha [out,retval]  
Pointer to the Boolean that is TRUE if the alpha plane is enable, or FALSE otherwise  
Alpha [in]  
Set to TRUE to enable the alpha plane, or set to FALSE to disable it.  


Return Values


S_OK  
Success  
E_FAIL  
Failure.  

Example


The following VB example moves a transparent ellipse over the live video creating an animation effect:

Dim 
As Integer

Dim 
As
 Integer
Dim sy As Integer
Dim sx As Integer

Private Sub
 Form_Load()
ActiveGige1.Acquire=
True
ActiveGige1.Alpha=
True
End Sub

Private Sub ActiveGige1_FrameAcquired()
ActiveGige1.DrawAlphaEllipse x, 10, 400 + x, 200, 0, 0, 0, 0, 0
x = x + 1
y = y + 1
If x = sx Then
x = 0
End If
If y = sy Then
y = 0
End If
ActiveGige1.DrawAlphaEllipse x, 10, 400 + x, 200, 0, 255, 255, 0, 30
End Sub
 

Remarks

The Alpha feature lets you display multi-colored custom graphics and text over the live video image. Unlike the Overlay which has a solid color, objects in the alpha plane can be assigned different colors and opacity.

Setting this property to true causes ActiveGige to show the alpha plane. Disabling this property hides the alpha plane. Note that hiding the alpha plane does not erase graphics and text from it. To clear the alpha plane, use DrawAlphaClear. For more information see DrawAlphaPixel, DrawAlphaLine, DrawAlphaRectangle, DrawAlphaEllipse, DrawAlphaText.

Note that using the alpha plane may increase the CPU load of your application.