TVideoGrabber.DrawBitmapOverFrame

Prev

Next

TVideoGrabber

Methods

 




































































































Draws the bitmap passed as parameter over video frames.


Declaration
function DrawBitmapOverFrame (Bitmap: Graphics.TBitmap; LeftLocation: LongInt; TopLocation: LongInt; bmWidth: LongInt; bmHeight: LongInt; Transparent: Boolean; UseTransparentColor: Boolean; TransparentColorValue: TColor; AlphaBlend: Boolean; AlphaBlendValue: LongInt): Boolean;


bool __fastcall DrawBitmapOverFrame(Graphics::TBitmap *Bitmap, int LeftLocation, int TopLocation, int bmWidth, int bmHeight, bool Transparent, bool UseTransparentColor, TColor TransparentColorValue, bool AlphaBlend, int AlphaBlendValue)


Function DrawBitmapOverFrame(BitmapHandle As Long, LeftLocation As Long, TopLocation As Long, bmWidth As Long, bmHeight As Long, Transparent As Boolean, UseTransparentColor As Boolean, TransparentColorValue As Long, AlphaBlend As Boolean, AlphaBlendValue As Long) As Boolean

Description

Used to draw bitmaps over video frames.

Location
The bitmap is drawn at the LeftLocation, TopLocation position over the video frame (expressed in pixels).


Size
If the bmWidth or bmHeight parameter is different from the bitmap's width or height, the bitmap is stretched to bmWidth and bmHeight.


Transparency

- if the Transparent parameter is true, the image background is not drawn.

- f the Transparent parameter is true and the UseTransparentColor parameter is true, the TransparentColorValue value is used for transparency.


Alpha blending

If the AlphaBlend parameter is true, a progressive bitmap transparency is applied, depending of the AlphaBlendValue, in a 0..255 range.
It is not possible to perform alphablending when the Transparent parameter is true.
Important:
if the bitmap color format is not 32 bits, it will be converted into a 32 bit format. In other words, for better performance pass a bitmap already in 32 bits color format.


The DrawBitmapOverFrame function can be called ONLY from the OnFrameOverlayUsingDC event.
See the MainDemo project for sample code.


See Also
TCardinalDirection TOnFrameOverlayUsingDC TOnFrameOverlayUsingDIB TTextOverlayAlign AdjustOverlayAspectRatio GetFrameInfoString ImageOverlay_StretchToVideoSize MouseWheelEventEnabled OnFrameBitmap OnFrameBitmapEventSynchrone OnFrameOverlayUsingDC OnFrameOverlayUsingDIB OnFrameOverlayUsingVIDEOHDR OnMouseDown OnMouseMove OnMouseUp OnMouseWheel OverlayAfterTransform RefreshPlayerOverlays SetImageOverlay_AlphaBlend SetImageOverlay_AlphaBlendValue SetImageOverlay_ChromaKey SetImageOverlay_ChromaKeyLeewayPercent SetImageOverlay_ChromaKeyRGBColor SetImageOverlay_Enabled SetImageOverlay_Height SetImageOverlay_LeftLocation SetImageOverlay_RotationAngle SetImageOverlay_StretchToVideoSize SetImageOverlay_TargetDisplay SetImageOverlay_TopLocation SetImageOverlay_Transparent SetImageOverlay_TransparentColorValue SetImageOverlay_UseTransparentColor SetImageOverlay_Width SetImageOverlayFromBMPFile SetImageOverlayFromHBitmap SetImageOverlayFromHBitmap2 SetImageOverlayFromImageFile SetImageOverlayFromImageFile2 SetImageOverlayFromJPEGFile SetImageOverlayFromTBitmap SetImageOverlayFromTBitmap2 SetImageOverlayFromTImage SetImageOverlayFromTImage2 SetTextOverlay_Align SetTextOverlay_BkColor SetTextOverlay_CustomVar SetTextOverlay_Enabled SetTextOverlay_Font SetTextOverlay_FontColor SetTextOverlay_GradientColor SetTextOverlay_GradientMode SetTextOverlay_HighResFont SetTextOverlay_Left SetTextOverlay_Right SetTextOverlay_Scrolling SetTextOverlay_ScrollingSpeed SetTextOverlay_Shadow SetTextOverlay_ShadowColor SetTextOverlay_ShadowDirection SetTextOverlay_String SetTextOverlay_TargetDisplay SetTextOverlay_Top SetTextOverlay_Transparent ShapeOverlay ShapeOverlayEnabled ShapeOverlayList TextOverlay_Align TextOverlay_BkColor TextOverlay_CreateCustomFont TextOverlay_CreateCustomFont2 TextOverlay_Enabled TextOverlay_Font TextOverlay_FontColor TextOverlay_Left TextOverlay_Right TextOverlay_Scrolling TextOverlay_ScrollingSpeed TextOverlay_Selector TextOverlay_Shadow TextOverlay_ShadowColor TextOverlay_ShadowDirection TextOverlay_String TextOverlay_Top TextOverlay_Transparent TranslateMouseCoordinates