Isle
Loading...
Searching...
No Matches
MxVideoPresenter::AlphaMask Class Reference

Opaque mask used for efficient hit testing against video transparency. More...

#include <mxvideopresenter.h>

Public Member Functions

 AlphaMask (const MxBitmap &)
 Creates an alpha mask from a bitmap, recording pixel presence in a bitmask. More...
 
 AlphaMask (const AlphaMask &)
 Copy constructor, clones the bitmask and size. More...
 
virtual ~AlphaMask ()
 Frees the bitmask memory. More...
 
MxS32 IsHit (MxU32 p_x, MxU32 p_y)
 Checks whether the specified local coordinate is visible in the mask. More...
 
MxS32 GetWidth () const
 [AI] Width of the alpha mask in pixels. More...
 
MxS32 GetHeight () const
 [AI] Height of the alpha mask in pixels. More...
 

Detailed Description

Opaque mask used for efficient hit testing against video transparency.

[AI] An alpha mask representing frame pixel visibility as a bitmask for hit testing. Constructed from or copied from a video frame. Used to determine clickable regions or pointer hits on non-rectangular/transparent video.

Definition at line 205 of file mxvideopresenter.h.

Constructor & Destructor Documentation

◆ AlphaMask() [1/2]

MxVideoPresenter::AlphaMask::AlphaMask ( const MxBitmap p_bitmap)

Creates an alpha mask from a bitmap, recording pixel presence in a bitmask.

Parameters
p_bitmapSource bitmap to generate mask from. [AI]

Definition at line 15 of file mxvideopresenter.cpp.

◆ AlphaMask() [2/2]

MxVideoPresenter::AlphaMask::AlphaMask ( const AlphaMask p_alpha)

Copy constructor, clones the bitmask and size.

Parameters
p_alphaSource alpha mask. [AI]

Definition at line 62 of file mxvideopresenter.cpp.

◆ ~AlphaMask()

MxVideoPresenter::AlphaMask::~AlphaMask ( )
virtual

Frees the bitmask memory.

[AI]

Definition at line 73 of file mxvideopresenter.cpp.

Member Function Documentation

◆ GetHeight()

MxS32 MxVideoPresenter::AlphaMask::GetHeight ( ) const
inline

[AI] Height of the alpha mask in pixels.

Definition at line 241 of file mxvideopresenter.h.

◆ GetWidth()

MxS32 MxVideoPresenter::AlphaMask::GetWidth ( ) const
inline

[AI] Width of the alpha mask in pixels.

Definition at line 237 of file mxvideopresenter.h.

◆ IsHit()

MxS32 MxVideoPresenter::AlphaMask::IsHit ( MxU32  p_x,
MxU32  p_y 
)

Checks whether the specified local coordinate is visible in the mask.

Parameters
p_xX coordinate (0-based, mask-local). [AI]
p_yY coordinate (0-based, mask-local). [AI]
Returns
1 if hit (non-transparent), 0 otherwise. [AI]

[AI]

Definition at line 81 of file mxvideopresenter.cpp.


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