VideoPlayer.OSDItemRectangleAdd method |
|
Remarks
Adds a rectangle as a new graphical item on the On-Screen-Display (OSD).
For further details about the use of the embedded video player see the VideoPlayer class section.
For details about video clips rendering refer to the How to play video files through DirectShow tutorial.
Syntax
[Visual Basic] Public Function OSDItemRectangleAdd ( nPlayerIndex as Int16, fLeftPos as Single, fTopPos as Single, fWidth as Single, fHeight as Single, nAlpha as Int16, nZOrder as Int32, bShow as Boolean, color as Color ) as Int32 |
[C#] public Int32 OSDItemRectangleAdd ( Int16 nPlayerIndex, float fLeftPos, float fTopPos, float fWidth, float fHeight, Int16 nAlpha, Int32 nZOrder, bool bShow, Color color ); |
[C++] public: Int32 OSDItemRectangleAdd ( Int16 nPlayerIndex, float fLeftPos, float fTopPos, float fWidth, float fHeight, Int16 nAlpha, Int32 nZOrder, bool bShow, Color color ); |
Parameter |
Description |
||||||
|
|
||||||
nPlayerIndex |
Number representing the zero-based index of the player that will use the video player. |
||||||
fLeftPos |
Horizontal position, expressed in percentage of the On-Screen-Display (OSD) area, where the item will be rendered. Position can be moved at a later time through the VideoPlayer.OSDItemMove method or through the VideoPlayer.OSDItemRectangleChange method. |
||||||
fTopPos |
Vertical position, expressed in percentage of the On-Screen-Display (OSD) area, where the item will be rendered. Position can be moved at a later time through the VideoPlayer.OSDItemMove method or through the VideoPlayer.OSDItemRectangleChange method. |
||||||
fWidth |
Width, expressed in percentage of the On-Screen-Display (OSD) area, of the rectangle. Size can be modified at a later time through the VideoPlayer.OSDItemRectangleChange method.. |
||||||
fHeight |
Height, expressed in percentage of the On-Screen-Display (OSD) area, of the rectangle. Size can be modified at a later time through the VideoPlayer.OSDItemRectangleChange method.. |
||||||
nAlpha |
Alpha channel transparency, expressed in percentage, applied to the item when rendered. Values can range from 0 (total opacity) to 100 (total transparency). The alpha channel transparency of the item can be modified at a later time through the VideoPlayer.OSDItemAlphaSet method. |
||||||
nZOrder |
Z-Order of the item. Items with a lower Z-Order value will stay on top respect to other Items having a higher Z-Order value; for example, an Item with Z-Order 0 will stay on top of any other Item but, in case two Items should be assigned the same Z-Order, the latest one having got the same Z-Order will be placed on top of the previous one. The Z-Order of the item can be modified at a later time through the VideoPlayer.OSDItemZOrderSet method. |
||||||
bShow |
Boolean flag that specifies if the item must be initially visible or hidden. Supported values are the following:
Visibility can be modified at a later time through the VideoPlayer.OSDItemShow method. |
||||||
color |
Color used to render this item. This setting can can be modified at a later time through the VideoPlayer.OSDItemRectangleChange method. |
Return value
Value |
Meaning |
|
|
0 |
An error occurred (see the LastError property for further error details) |
Other values |
Unique identifier of the graphical item: this unique identifier will be used in order to invoke further methods related to the use of this specific item |