DrawAlphaClear
Top  Previous  Next

Description

Clears graphics and text from the alpha plane and resets the plane to the fully transparent state.


Syntax


[VB]
objActiveUSB.DrawAlphaClear


[C/C++]
HRESULT DrawAlphaClear();


Parameters

None  


Return Values


S_OK  
Success  
E_FAIL  
Failure.  

Example


The following VB example moves a transparent red rectangle over the live image by repeatedly erasing and drawing it:

Dim
 x As 
Integer

Private Sub
 Form_Load()
x = 0
ActiveUSB1.Acquire = 
True
ActiveUSB1.Alpha = 
True
End Sub


Private Sub ActiveUSB1_FrameAcquired()
ActiveUSB1.DrawAlphaClear
ActiveUSB1.DrawAlphaRectangle x, 10, x + 50, 80, 0, 255,0,0,50
x = x + 2
If x = ActiveUSB1.SizeX Then
x = 0
End If
End Sub


Remarks

To create animation effects, use this method in combination with DrawAlphaPixel, DrawAlphaLine, DrawAlphaRectangle, DrawAlphaEllipse, DrawAlphaText. For more information on the alpha-plane drawing refer to Alpha.