Display controller. More...
Public Member Functions | |
| PvDisplayWnd (int32_t aMaxNumberOfThreads=-1) | |
| Constructor. More... | |
| virtual | ~PvDisplayWnd () |
| Destructor. | |
| PvResult | Display (const PvBuffer &aBuffer, bool aVSync=false) |
| Display an image. More... | |
| PvResult | Display (const IPvImage *aImage, bool aVSync=false) |
| Display an image. More... | |
| PvResult | Display (const IPvGenDCImage *aImage, bool aVSync=false) |
| Display an image from a GenDC Part. More... | |
| PvResult | SetBackgroundColor (uint8_t aR, uint8_t aG, uint8_t aB) |
| Set the display's background color. More... | |
| PvBufferConverter & | GetConverter () |
| Returns a reference to the internal buffer converter. More... | |
| PvRendererMode | GetRendererMode () |
| Returns the currently selected renderer mode. More... | |
| PvResult | SetRendererMode (PvRendererMode aMode) |
| Sets the renderer mode. More... | |
| void | Refresh () |
| Repaints the current internal buffer to screen. More... | |
| void | Clear () |
| Clears the display. | |
| void | SetTextOverlay (const PvString &aText) |
| Sets the text overlay. More... | |
| void | SetTextOverlayColor (uint8_t aR, uint8_t aG, uint8_t aB) |
| Sets the color of the text overlay. More... | |
| PvResult | SetTextOverlaySize (int32_t aSize) |
| Sets the text overlay font size. More... | |
| void | SetTextOverlayOffsetX (uint32_t aX) |
| Sets the X offset of the text overlay on the image. More... | |
| void | SetTextOverlayOffsetY (uint32_t aY) |
| Sets the Y offset of the text overlay on the image. More... | |
| PvString | GetTextOverlay () const |
| Returns the current text overlay string. More... | |
| void | GetTextOverlayColor (uint8_t &aR, uint8_t &aG, uint8_t &aB) const |
| Returns the text overlay color. More... | |
| int32_t | GetTextOverlaySize () const |
| Returns the text overlay size. More... | |
| int32_t | GetTextOverlayOffsetX () const |
| Returns the text overlay offset X. More... | |
| int32_t | GetTextOverlayOffsetY () const |
| Returns the text overlay offset Y. More... | |
| PvBuffer & | GetInternalBuffer () |
| Returns a reference to the internal display buffer. More... | |
Public Member Functions inherited from PvWnd | |
| void | SetPosition (int32_t aPosX, int32_t aPosY, int32_t aSizeX, int32_t aSizeY) |
| Set the window's position and size. More... | |
| void | GetPosition (int32_t &aPosX, int32_t &aPosY, int32_t &aSizeX, int32_t &aSizeY) |
| Get the window's position and size. More... | |
| PvResult | ShowModal () |
| Display the window (modal). More... | |
| PvResult | ShowModal (QWidget *aParentHwnd) |
| Display the window (modal). More... | |
| PvResult | Create (QWidget *aHwnd) |
| Display the window (embedded in your program's window). More... | |
| PvResult | ShowModeless () |
| Display the window (non-modal). More... | |
| PvResult | ShowModeless (QWidget *aParentHwnd) |
| Display the window (non-modal). More... | |
| QWidget * | GetQWidget () |
| Get the display controller's (PvWnd object) handle. More... | |
| PvString | GetTitle () const |
| Get the window's title. More... | |
| void | SetTitle (const PvString &aTitle) |
| Set the window's title. More... | |
| PvResult | Close () |
| Close the window. More... | |
Static Public Member Functions | |
| static PvRendererMode | GetHighestRendererMode () |
| Static method returning the highest supported renderer mode. More... | |
| static PvString | GetRenderer () |
| Returns a string describing the renderer used by the display. More... | |
| static PvString | GetRendererVersion () |
| Returns a string representing the version of the renderer used by the display. More... | |
Static Public Member Functions inherited from PvWnd | |
| static void | DoEvents () |
| Processes all pending events for the calling thread. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from PvWnd | |
| PvWnd () | |
| Constructor. | |
| virtual | ~PvWnd () |
| Destructor. | |
Display controller.
To display images:
| PvDisplayWnd::PvDisplayWnd | ( | int32_t | aMaxNumberOfThreads = -1 | ) |
Constructor.
| [in] | aMaxNumberOfThreads | Maximum number of threads to use for internal pixel conversion. See PvBufferConverter for more information. |
| PvResult PvDisplayWnd::Display | ( | const IPvGenDCImage * | aImage, |
| bool | aVSync = false |
||
| ) |
Display an image from a GenDC Part.
| [in] | IPvGenDCImage | Pointer to an IPvGenDCImage object. |
| [in] | aVSync | Synchronize the display refresh with the moitor's vertical sync. Reduces blurring but can increase CPU usage. |
| Includes |
Display an image.
| [in] | aBuffer | The buffer containing the image to display. |
| [in] | aVSync | Synchronize the display refresh with the moitor's vertical sync. Reduces blurring but can increase CPU usage. |
| Includes |
| PvBufferConverter & PvDisplayWnd::GetConverter | ( | ) |
Returns a reference to the internal buffer converter.
When writing the buffer to a file requires a conversion, it is performed automatically by the PvBufferWriter. The converter used for this operation can be configured using this method. As an example, a RGB filter could be set or the Bayer interpolation method could be selected.
| The | internal buffer converter. |
|
static |
Static method returning the highest supported renderer mode.
| Renderer | mode. |
| PvBuffer & PvDisplayWnd::GetInternalBuffer | ( | ) |
Returns a reference to the internal display buffer.
It is not recommended to write to this buffer. The main use of this method would be save an extra conversion to RGB when displaying an image. Just use the Display method and then access the display's internal RGB image instead of having to re-perform the conversion to RGB.
|
static |
Returns a string describing the renderer used by the display.
| Renderer | used by the display. |
| PvRendererMode PvDisplayWnd::GetRendererMode | ( | ) |
Returns the currently selected renderer mode.
| Renderer | mode. |
|
static |
Returns a string representing the version of the renderer used by the display.
| Version | of the renderer used by the display. |
| PvString PvDisplayWnd::GetTextOverlay | ( | ) | const |
Returns the current text overlay string.
| void PvDisplayWnd::GetTextOverlayColor | ( | uint8_t & | aR, |
| uint8_t & | aG, | ||
| uint8_t & | aB | ||
| ) | const |
Returns the text overlay color.
| aR | [in] 8-bit red color component |
| aG | [in] 8-bit green color component |
| aB | [in] 8-bit blue color component |
| int32_t PvDisplayWnd::GetTextOverlayOffsetX | ( | ) | const |
Returns the text overlay offset X.
Defined in display pixels, from the upper left corner of the display.
| int32_t PvDisplayWnd::GetTextOverlayOffsetY | ( | ) | const |
Returns the text overlay offset Y.
Defined in display pixels, from the upper left corner of the display.
| int32_t PvDisplayWnd::GetTextOverlaySize | ( | ) | const |
Returns the text overlay size.
The size is native font size on MFC, Qt or .NET.
| void PvDisplayWnd::Refresh | ( | ) |
Repaints the current internal buffer to screen.
The internal buffer contains the image last displayed with Display (or custom content directly rendered using GetInternalBuffer) and this method only paints (or repaints) the content of that buffer to the control.
| PvResult PvDisplayWnd::SetBackgroundColor | ( | uint8_t | aR, |
| uint8_t | aG, | ||
| uint8_t | aB | ||
| ) |
Set the display's background color.
Each of the color components can range from 0 to 255.
| [in] | aR | Color component: Red. |
| [in] | aG | Color component: Green. |
| [in] | aB | Color component: Blue. |
| Includes |
| PvResult PvDisplayWnd::SetRendererMode | ( | PvRendererMode | aMode | ) |
Sets the renderer mode.
| [in] | aMode | New renderer mode. |
| void PvDisplayWnd::SetTextOverlay | ( | const PvString & | aText | ) |
Sets the text overlay.
The display is not immediately updated: the new text overlay is used with all Display method calls until changed or reset.
To clear the text overlay, set it to an empty string.
| aText | [in] The new text overlay. |
| void PvDisplayWnd::SetTextOverlayColor | ( | uint8_t | aR, |
| uint8_t | aG, | ||
| uint8_t | aB | ||
| ) |
Sets the color of the text overlay.
| aR | [in] 8-bit red color component |
| aG | [in] 8-bit green color component |
| aB | [in] 8-bit blue color component |
| void PvDisplayWnd::SetTextOverlayOffsetX | ( | uint32_t | aX | ) |
Sets the X offset of the text overlay on the image.
The offset is defined in screen pixels.
| aX | [in] X offset |
| void PvDisplayWnd::SetTextOverlayOffsetY | ( | uint32_t | aY | ) |
Sets the Y offset of the text overlay on the image.
The offset is defined in screen pixels.
| aY | [in] Y offset |
| PvResult PvDisplayWnd::SetTextOverlaySize | ( | int32_t | aSize | ) |
Sets the text overlay font size.
The size is native font size on MFC, Qt or .NET.
A good way of managing the font size is to start with the default size and increase or decrease it relatively:
Make text size 50% of original: display.SetTextOverlaySize( display.GetTextOverlaySize() / 2 ); Make text size 200% of original: display.SetTextOverlaySize( display.GetTextOverlaySize() * 2 );
| aSize | [in] New font size |
Copyright (c) 2002-2026 Pleora Technologies Inc.
www.pleora.com