Ocean
Ocean::Platform::Win::Utilities Class Reference

This class implements utilities and helper functions. More...

Static Public Member Functions

static void textOutput (HDC dc, const int x, const int y, const std::string &text)
 Prints a text on the given device context. More...
 
static void desktopTextOutput (const int x, const int y, const std::string &text)
 Prints a text on the desktop. More...
 
static void frameOutput (HDC dc, const int x, const int y, const Frame &frame)
 Prints a frame on the given device context. More...
 
static void frameOutput (HDC dc, const int x, const int y, const unsigned int width, const unsigned int height, const Frame &frame)
 Prints a frame on the given device context. More...
 
static void desktopFrameOutput (const int x, const int y, const Frame &frame)
 Prints a given frame on the Windows' main desktop at a specified location. More...
 
static void desktopFrameOutput (const int x, const int y, const unsigned int scale, const Frame &frame)
 Prints a given frame on the Windows' main desktop at a specified location. More...
 
static void desktopFrameOutput (const int x, const int y, const unsigned int width, const unsigned int height, const Frame &frame)
 Prints a given frame on the Windows' main desktop at a specified location. More...
 
static void bitmapOutput (HDC dc, const int x, const int y, const Bitmap &bitmap)
 Prints a bitmap on the given device context. More...
 
static void desktopBitmapOutput (const int x, const int y, const unsigned int scale, const Bitmap &bitmap)
 Prints a bitmap on the desktop. More...
 
static void bitmapOutput (HDC dc, const int x, const int y, const unsigned int width, const unsigned int height, const Bitmap &bitmap)
 Prints a bitmap on the given device context. More...
 
static void desktopBitmapOutput (const int x, const int y, const Bitmap &bitmap)
 Prints a bitmap on the desktop. More...
 
static void desktopBitmapOutput (const int x, const int y, const unsigned int width, const unsigned int height, const Bitmap &bitmap)
 Prints a bitmap on the desktop. More...
 
static CV::PixelBoundingBox textBoundingBox (const std::string &value, const std::string &font=std::string(), const unsigned int size=0u)
 Determines the bounding box of a given string with specified font and font size. More...
 
static CV::PixelBoundingBox textBoundingBox (const std::wstring &value, const std::wstring &font=std::wstring(), const unsigned int size=0u)
 Determines the bounding box of a given string with specified font and font size. More...
 

Detailed Description

This class implements utilities and helper functions.

Member Function Documentation

◆ bitmapOutput() [1/2]

static void Ocean::Platform::Win::Utilities::bitmapOutput ( HDC  dc,
const int  x,
const int  y,
const Bitmap bitmap 
)
static

Prints a bitmap on the given device context.

Parameters
dcDevice context receiving the bitmap
xHorizontal output position
yVertical output position
bitmapbitmap to be printed

◆ bitmapOutput() [2/2]

static void Ocean::Platform::Win::Utilities::bitmapOutput ( HDC  dc,
const int  x,
const int  y,
const unsigned int  width,
const unsigned int  height,
const Bitmap bitmap 
)
static

Prints a bitmap on the given device context.

Parameters
dcDevice context receiving the text
xHorizontal output position
yVertical output position
widthOutput width in pixel
heightOutput height in pixel
bitmapbitmap to be printed

◆ desktopBitmapOutput() [1/3]

static void Ocean::Platform::Win::Utilities::desktopBitmapOutput ( const int  x,
const int  y,
const Bitmap bitmap 
)
static

Prints a bitmap on the desktop.

Parameters
xHorizontal output position
yVertical output position
bitmapbitmap to be printed

◆ desktopBitmapOutput() [2/3]

void Ocean::Platform::Win::Utilities::desktopBitmapOutput ( const int  x,
const int  y,
const unsigned int  scale,
const Bitmap bitmap 
)
inlinestatic

Prints a bitmap on the desktop.

Parameters
xHorizontal output position
yVertical output position
scaleScale of the output bitmap
bitmapBitmap to be printed

◆ desktopBitmapOutput() [3/3]

static void Ocean::Platform::Win::Utilities::desktopBitmapOutput ( const int  x,
const int  y,
const unsigned int  width,
const unsigned int  height,
const Bitmap bitmap 
)
static

Prints a bitmap on the desktop.

Parameters
xHorizontal output position
yVertical output position
widthOutput width in pixel
heightOutput height in pixel
bitmapbitmap to be printed

◆ desktopFrameOutput() [1/3]

static void Ocean::Platform::Win::Utilities::desktopFrameOutput ( const int  x,
const int  y,
const Frame frame 
)
static

Prints a given frame on the Windows' main desktop at a specified location.

You do not need to have a GUI application to use this function.
Call this function from any application and from any thread.
The painted frame will disappear immediately when Windows receives any repaint event.
This function is intended for debugging purposes only.

Parameters
xHorizontal output position, with range (-infinity, infinity)
yVertical output position, with range (-infinity, infinity)
frameThe frame to be printed

◆ desktopFrameOutput() [2/3]

void Ocean::Platform::Win::Utilities::desktopFrameOutput ( const int  x,
const int  y,
const unsigned int  scale,
const Frame frame 
)
inlinestatic

Prints a given frame on the Windows' main desktop at a specified location.

You do not need to have a GUI application to use this function.
Call this function from any application and from any thread.
The painted frame will disappear immediately when Windows receives any repaint event.
This function is intended for debugging purposes only.

Parameters
xHorizontal output position, with range (-infinity, infinity)
yVertical output position, with range (-infinity, infinity)
scaleThe scale that is applied to the frame, a factor of 2 will increase the painted frame by two, with range [1, infinity)
frameThe frame to be printed

◆ desktopFrameOutput() [3/3]

static void Ocean::Platform::Win::Utilities::desktopFrameOutput ( const int  x,
const int  y,
const unsigned int  width,
const unsigned int  height,
const Frame frame 
)
static

Prints a given frame on the Windows' main desktop at a specified location.

You do not need to have a GUI application to use this function.
Call this function from any application and from any thread.
The painted frame will disappear immediately when Windows receives any repaint event.
This function is intended for debugging purposes only.

Parameters
xHorizontal output position, with range (-infinity, infinity)
yVertical output position, with range (-infinity, infinity)
widthThe width of the painted frame in the domain of the desktop, in pixel, with range [1, infinity)
heightThe height of the painted frame in the domain of the desktop, in pixel, with range [1, infinity)
frameThe frame to be printed

◆ desktopTextOutput()

static void Ocean::Platform::Win::Utilities::desktopTextOutput ( const int  x,
const int  y,
const std::string &  text 
)
static

Prints a text on the desktop.

Parameters
xHorizontal output position
yVertical output position
textText to be printed

◆ frameOutput() [1/2]

static void Ocean::Platform::Win::Utilities::frameOutput ( HDC  dc,
const int  x,
const int  y,
const Frame frame 
)
static

Prints a frame on the given device context.

Parameters
dcDevice context receiving the frame
xHorizontal output position
yVertical output position
frameThe frame to be printed

◆ frameOutput() [2/2]

static void Ocean::Platform::Win::Utilities::frameOutput ( HDC  dc,
const int  x,
const int  y,
const unsigned int  width,
const unsigned int  height,
const Frame frame 
)
static

Prints a frame on the given device context.

Parameters
dcDevice context receiving the text
xHorizontal output position
yVertical output position
widthOutput width in pixel
heightOutput height in pixel
frameThe frame to be printed

◆ textBoundingBox() [1/2]

static CV::PixelBoundingBox Ocean::Platform::Win::Utilities::textBoundingBox ( const std::string &  value,
const std::string &  font = std::string(),
const unsigned int  size = 0u 
)
static

Determines the bounding box of a given string with specified font and font size.

Parameters
valueThe string for which the bounding box will be determined
fontThe name of the font which will be applied
sizeThe size of the font
Returns
The bounding box of the given string

◆ textBoundingBox() [2/2]

static CV::PixelBoundingBox Ocean::Platform::Win::Utilities::textBoundingBox ( const std::wstring &  value,
const std::wstring &  font = std::wstring(),
const unsigned int  size = 0u 
)
static

Determines the bounding box of a given string with specified font and font size.

Parameters
valueThe string for which the bounding box will be determined
fontThe name of the font which will be applied
sizeThe size of the font
Returns
The bounding box of the given string

◆ textOutput()

static void Ocean::Platform::Win::Utilities::textOutput ( HDC  dc,
const int  x,
const int  y,
const std::string &  text 
)
static

Prints a text on the given device context.

Parameters
dcDevice context receiving the text
xHorizontal output position
yVertical output position
textText to be printed

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