ADTF Display Toolbox
|
The Streaming Source 2D OpenGL Display, offers the possibility to display all Drawers which are connected to the 2D OpenGL Display via BindingProxy.
To use the 2D OpenGL Display, simply add it to the Streaming Graph and connect the Drawers to the Streaming Source.
You can use the 2D OpenGL Display multiple times and connect each Drawer to the 2D OpenGL Display where it should be displayed.
Drawers are ADTF Plugins, which are a compound of an ADTF Filter and the IDrawer interface. This means that they offer all functionality which is typically for a filter, and additionally functionality defined by the IDrawer interface. This interface offers possibilities to add and manage 2D data which is added to the canvas object provided by the 2D OpenGL Display through a callback mechanism.
The basic behaviour of a Drawer is defined by the base class cDrawer. When implementing a custom Drawer, cDrawer is subclassed, and methods are overwritten to provide the custom behaviour,
especially the cDrawer::Draw(...) method defines what data is painted on the canvas object and therefore shown on the 2D OpenGL Display.
Just use the pointer to the ICanvas Interface which will be provided through 2D OpenGL Display during the active callback routine and call the painting functions with it you want to use. Each custom Drawer (= plugin) can manage its data independently, without knowing about other Drawers.
The technique to define custom 2D Data is exclusively based on OpenGL wrapped in a conveniance API provided throught the ICanvas Interface.
This section provides information about the 2D OpenGL Display. The 2D OpenGL Display paints all Drawer data and provides some interaction with the 2D canvas.
All Drawers connected to one instance of the 2D OpenGL Display will be called and can paint their information onto the canvas. The order in which the individual Drawer will be called from the callback mechanism of the 2D OpenGL Display is defined by two properties. Each Drawer derived from cDrawer will inherit multiple properties. To specify the hierachy in which of all connected Drawers you can use the ZOrder and Parent property. The Parent property defines which coordinate system is the basis for all drawing operations done by the Drawer. The default value is "world" which is base for all Drawers. With the ZOrder property you can define which Drawer paints over other Drawers with the same parent.
Plugin Filename | 2d_display.adtfplugin |
---|---|
Plugin Description | 2d_display.plugindescription |
Plugin Name | Qt5 2D OpenGL Display Plugin |
License | ADTF |
Support Mail | support@digitalwerk.net |
Homepage URL | https://support.digitalwerk.net/ |
Plugin Version | 3.99.99 |
---|---|
Plugin File Version | 1.0 |
adtf::disptb | 3.99.99 |
adtf | 3.18.5 |
adtf::ucom | 3.1.0 |
Name | Qt5 2D OpenGL Display |
---|---|
CID | 2d_display.streaming_source.disptb.cid |
Description | Use this Streaming Source to work on a 2D Canvas based on OpenGL which is extendable with ADTF Drawers. |
Type | Filter |
Name | Value | Type | Description | Subproperties |
---|---|---|---|---|
background_color | #FFFFFFFF | cString | The background color | |
capture/file_prefix | 2D_Display_Screenshot_ | cString | The name prefix of the saved screenshots | |
capture/file_type | 2 | tUInt32 | The filetype of the saved screenshots | Value List: *.bmp = 0 *.jpeg = 1 *.png = 2 |
capture/key | F5 | cString | The Key to press to take a screenshot | |
capture/path | /root/Pictures | cFilepath | The path where screenshots will be saved to. Default will be the OS default pictures folder | |
desired_frame_rate | 25.000000 | tFloat64 | Target frame rate for redraws. Additional frames may be rendered on ongoing user interaction. If the widget is visible, actual frame rate may be limited by V-sync. Actual rendering frame rate can differ from sample rate on output pin, if processing speed is limited. | |
multisample_antialiasing | 0 | tInt32 | Enable multi sampling anti-aliasing. Improves image quality, at the cost of proportionally increased GPU load and VRAM cost. | Extendable Value List: off = 0 2x = 2 4x = 4 8x = 8 16x = 16 |
origin/x | 1 | tUInt32 | The offset of the x axis | |
origin/y | 1 | tUInt32 | The offset of the y axis | |
output/enabled | false | tBool | Send samples on the output pin. | |
output/height | 0 | tUInt32 | If height > 0, sets fixed height for output pin and snapshots. Also restricts aspect ratio. | |
output/width | 0 | tUInt32 | If width > 0, sets fixed width for output pin and snapshots. Also restricts aspect ratio. | |
scale/x | 1.000000 | tFloat64 | The scaling of the x axis | |
scale/y | 1.000000 | tFloat64 | The scaling of the y axis | |
title | 2D Display | cString | The title of the display window |
Name | Stream Type | Description |
---|---|---|
output | adtf/image | Output pin from current canvas as video data. |
Name | IID | Proxy OID | Description |
---|---|---|---|
drawer_manager | drawermanager.dengar.drawerlib.disptb.adtf.iid | IDrawerManager interface |
Dynamic Input Pins | false |
---|---|
Dynamic Output Pins | false |
Dynamic Input Binding Pins | false |
Dynamic Output Binding Pins | false |
IID |
---|
qt_xsystem.spider.services.adtf.iid |
reference_clock.riddler.streaming.adtf.iid |
Pin Name | output | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Meta Type Name | adtf/image | ||||||||||||||||||||||||||||||
Stream Type Properties |
|
If a Drawer is placed in the Filter Graph, you need to connect them via the BindingProxy Interface called drawer_manager.
The interactions with the canvas are:
The above list of the context menu is automatically provided by the 2D OpenGL Display.
All interfaces and functionalities related to Drawers is provided by packages. These packages are part of the Display Toolbox. In the installation they can be found in the folder 'pkg'.
To address different needs, the functionality is split into 2 packages:
Relevant for developing custom Drawers is the packages 'adtf::disptb::drawerlib'.
Part of the Drawer concept are coordinate systems. Each Drawer holds a own coordinate system in relation to the Drawer parent. You can manipulate the coordinate system of the Drawer with the provided properties of cDrawer.
By default all these values are set to zero.
You only need to create a custum class which derives from the cDrawer base class. Then just overwrite the virtual function Draw implemented in cDrawer with your own implementation.
Just take a look at our provided examples.