Pleora Technologies Inc. eBUS SDK v7.0.1.7536 API



PvDisplayWnd Class Reference

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...
 
PvBufferConverterGetConverter ()
 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...
 
PvBufferGetInternalBuffer ()
 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.
 

Detailed Description

Display controller.

To display images:

  1. Decide if you want the display in a standalone window or embedded as an element of a window you control.
  2. Create a display window (PvDisplayWnd object).
  3. If you want to display in a standalone window, optionally set window's position. Use SetPosition.
  4. Optionally, set the background color. Use SetBackgroundColor.
  5. Make the display controller appear.
    • To embed the display in your own application (a window you control yourself), use Create.
    • To set the display as part of a standalone modal window, use ShowModal.
    • To set the display as part of a standalone nonmodal window, use ShowModeless.
  6. Make an image appear in the display area. Use Display.
  7. Optionally, update the image (i.e. show a movie by displaying many images sequentially). Use additional calls to Display.
  8. Set the window's position. Use SetPosition. Use the same method to resize the window.
  9. Close the window. Use Close.

Constructor & Destructor Documentation

◆ PvDisplayWnd()

PvDisplayWnd::PvDisplayWnd ( int32_t  aMaxNumberOfThreads = -1)

Constructor.

Parameters
[in]aMaxNumberOfThreadsMaximum number of threads to use for internal pixel conversion. See PvBufferConverter for more information.

Member Function Documentation

◆ Display() [1/3]

PvResult PvDisplayWnd::Display ( const IPvGenDCImage aImage,
bool  aVSync = false 
)

Display an image from a GenDC Part.

Parameters
[in]IPvGenDCImagePointer to an IPvGenDCImage object.
[in]aVSyncSynchronize the display refresh with the moitor's vertical sync. Reduces blurring but can increase CPU usage.
Return values
Includes

◆ Display() [2/3]

PvResult PvDisplayWnd::Display ( const IPvImage aImage,
bool  aVSync = false 
)

Display an image.

Parameters
[in]IPvImagePointer to an IPvImage object.
[in]aVSyncSynchronize the display refresh with the moitor's vertical sync. Reduces blurring but can increase CPU usage.
Return values
Includes

◆ Display() [3/3]

PvResult PvDisplayWnd::Display ( const PvBuffer aBuffer,
bool  aVSync = false 
)

Display an image.

Parameters
[in]aBufferThe buffer containing the image to display.
[in]aVSyncSynchronize the display refresh with the moitor's vertical sync. Reduces blurring but can increase CPU usage.
Return values
Includes

◆ GetConverter()

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.

Return values
Theinternal buffer converter.

◆ GetHighestRendererMode()

PvRendererMode PvDisplayWnd::GetHighestRendererMode ( )
static

Static method returning the highest supported renderer mode.

Return values
Renderermode.

◆ GetInternalBuffer()

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.

◆ GetRenderer()

PvString PvDisplayWnd::GetRenderer ( )
static

Returns a string describing the renderer used by the display.

Return values
Rendererused by the display.

◆ GetRendererMode()

PvRendererMode PvDisplayWnd::GetRendererMode ( )

Returns the currently selected renderer mode.

Return values
Renderermode.

◆ GetRendererVersion()

PvString PvDisplayWnd::GetRendererVersion ( )
static

Returns a string representing the version of the renderer used by the display.

Return values
Versionof the renderer used by the display.

◆ GetTextOverlay()

PvString PvDisplayWnd::GetTextOverlay ( ) const

Returns the current text overlay string.

Returns
Text overlay string.

◆ GetTextOverlayColor()

void PvDisplayWnd::GetTextOverlayColor ( uint8_t &  aR,
uint8_t &  aG,
uint8_t &  aB 
) const

Returns the text overlay color.

Parameters
aR[in] 8-bit red color component
aG[in] 8-bit green color component
aB[in] 8-bit blue color component

◆ GetTextOverlayOffsetX()

int32_t PvDisplayWnd::GetTextOverlayOffsetX ( ) const

Returns the text overlay offset X.

Defined in display pixels, from the upper left corner of the display.

Returns
Text overlay offset X.

◆ GetTextOverlayOffsetY()

int32_t PvDisplayWnd::GetTextOverlayOffsetY ( ) const

Returns the text overlay offset Y.

Defined in display pixels, from the upper left corner of the display.

Returns
Text overlay offset Y.

◆ GetTextOverlaySize()

int32_t PvDisplayWnd::GetTextOverlaySize ( ) const

Returns the text overlay size.

The size is native font size on MFC, Qt or .NET.

Returns
Text overlay size.

◆ Refresh()

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.

◆ SetBackgroundColor()

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.

Parameters
[in]aRColor component: Red.
[in]aGColor component: Green.
[in]aBColor component: Blue.
Return values
Includes

◆ SetRendererMode()

PvResult PvDisplayWnd::SetRendererMode ( PvRendererMode  aMode)

Sets the renderer mode.

Parameters
[in]aModeNew renderer mode.

◆ SetTextOverlay()

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.

Parameters
aText[in] The new text overlay.

◆ SetTextOverlayColor()

void PvDisplayWnd::SetTextOverlayColor ( uint8_t  aR,
uint8_t  aG,
uint8_t  aB 
)

Sets the color of the text overlay.

Parameters
aR[in] 8-bit red color component
aG[in] 8-bit green color component
aB[in] 8-bit blue color component

◆ SetTextOverlayOffsetX()

void PvDisplayWnd::SetTextOverlayOffsetX ( uint32_t  aX)

Sets the X offset of the text overlay on the image.

The offset is defined in screen pixels.

Parameters
aX[in] X offset

◆ SetTextOverlayOffsetY()

void PvDisplayWnd::SetTextOverlayOffsetY ( uint32_t  aY)

Sets the Y offset of the text overlay on the image.

The offset is defined in screen pixels.

Parameters
aY[in] Y offset

◆ SetTextOverlaySize()

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 );

Parameters
aSize[in] New font size
Returns
Includes:
  • PvResult::Code::OK
  • RPvResult::Code::INVALID_PARAMETER if the font size is out of range or invalid

The documentation for this class was generated from the following files:

Copyright (c) 2002-2026 Pleora Technologies Inc.
www.pleora.com