The video surface class, see IVideoSurface. More...

#include "murl_util_video_surface.h"

Inheritance diagram for Murl::Util::VideoSurface:

Public Member Functions

 VideoSurface ()
 The default constructor. More...
 
 VideoSurface (UInt32 pixelSizeX, UInt32 pixelSizeY)
 Constructor creating a surface of specified dimension. More...
 
 VideoSurface (UInt32 pixelSizeX, UInt32 pixelSizeY, UInt32 bytesPerLine)
 Constructor creating a surface of specified dimension, with given line pitch. More...
 
 VideoSurface (IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY)
 Constructor creating a surface of specified pixel format and dimension. More...
 
 VideoSurface (IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY, UInt32 bytesPerLine)
 Constructor creating a surface of specified pixel format and dimension, with given line pitch. More...
 
 VideoSurface (IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY, MutableData &sourceData)
 Constructor creating a surface of specified pixel format and dimension with given source data. More...
 
 VideoSurface (IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY, UInt32 bytesPerLine, MutableData &sourceData)
 Constructor creating a surface of specified pixel format and dimension with given source data. More...
 
 VideoSurface (IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY, const ConstData &sourceData)
 Constructor creating a surface of specified pixel format and dimension with given source data. More...
 
 VideoSurface (IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY, UInt32 bytesPerLine, const ConstData &sourceData)
 Constructor creating a surface of specified pixel format and dimension with given source data. More...
 
virtual ~VideoSurface ()
 The destructor.
 
virtual IVideoSurfaceClone (IEnums::PixelFormat pixelFormat) const
 Implementation of IVideoSurface::Clone(IEnums::PixelFormat pixelFormat). More...
 
virtual IVideoSurfaceClone (UInt32 pixelSizeX, UInt32 pixelSizeY, const IVideoScaler *scaler=0, Real gamma=1.0f) const
 Implementation of IVideoSurface::Clone(IEnums::PixelFormat pixelFormat, const IVideoScaler* scaler = 0). More...
 
virtual IVideoSurfaceClone (IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY, const IVideoScaler *scaler=0, Real gamma=1.0f) const
 Implementation of IVideoSurface::Clone(IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY, const IVideoScaler* scaler). More...
 
virtual IVideoSurfaceCloneRotated (IEnums::Orientation orientation) const
 Implementation of IVideoSurface::CloneRotated(IEnums::Orientation orientation). More...
 
virtual IVideoSurfaceCloneRotated (IEnums::Orientation orientation, IEnums::PixelFormat pixelFormat) const
 Implementation of IVideoSurface::CloneRotated(IEnums::Orientation orientation, IEnums::PixelFormat pixelFormat). More...
 
virtual IVideoSurfaceCloneFrame (SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY) const
 Implementation of IVideoSurface::CloneFrame(). More...
 
virtual UInt32 GetPixelSizeX () const
 Implementation of IVideoSurface::GetPixelSizeX(). More...
 
virtual UInt32 GetPixelSizeY () const
 Implementation of IVideoSurface::GetPixelSizeY(). More...
 
virtual UInt32 GetBytesPerPixel () const
 Implementation of IVideoSurface::GetBytesPerPixel(). More...
 
virtual UInt32 GetBytesPerLine () const
 Implementation of IVideoSurface::GetBytesPerLine(). More...
 
virtual IEnums::PixelFormat GetPixelFormat () const
 Implementation of IVideoSurface::GetPixelFormat(). More...
 
virtual const ConstDataGetPixels () const
 Implementation of IVideoSurface::GetPixels(). More...
 
virtual const MutableDataGetMutablePixels ()
 Implementation of IVideoSurface::GetMutablePixels(). More...
 
virtual Color GetPixel (SInt32 positionX, SInt32 positionY) const
 Implementation of IVideoSurface::GetPixel(). More...
 
virtual Bool SetPixel (SInt32 positionX, SInt32 positionY, const Color &color)
 Implementation of IVideoSurface::SetPixel(). More...
 
virtual Bool FlipX ()
 Implementation of IVideoSurface::FlipX(). More...
 
virtual Bool FlipY ()
 Implementation of IVideoSurface::FlipY(). More...
 
virtual Bool Blit (const IVideoSurface *source, SInt32 destPositionX, SInt32 destPositionY)
 Implementation of IVideoSurface::Blit(const IVideoSurface* source, SInt32 destPositionX, SInt32 destPositionY). More...
 
virtual Bool Blit (const IVideoSurface *source, SInt32 sourcePositionX, SInt32 sourcePositionY, SInt32 destPositionX, SInt32 destPositionY, UInt32 pixelSizeX, UInt32 pixelSizeY)
 Implementation of IVideoSurface::Blit(const IVideoSurface* source, SInt32 sourcePositionX, SInt32 sourcePositionY, SInt32 destPositionX, SInt32 destPositionY, UInt32 pixelSizeX, UInt32 pixelSizeY). More...
 
virtual Bool BlitScaled (const IVideoSurface *source, const IVideoScaler *scaler=0, Real gamma=1.0f)
 Implementation of IVideoSurface::BlitScaled(). More...
 
virtual Bool Clear (const Color &clearColor)
 Implementation of IVideoSurface::Clear(const Color& clearColor). More...
 
virtual Bool Clear (SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color &clearColor)
 Implementation of IVideoSurface::Clear(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color& clearColor). More...
 
virtual Bool GaussBlur (Real strength)
 Implementation of IVideoSurface::GaussBlur(Real strength). More...
 
virtual Bool GaussBlur (SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, Real strength)
 Implementation of IVideoSurface::GaussBlur(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, Real strength). More...
 
virtual Bool ApplyMatte (const Color &matteColor, Real matteThreshold=0)
 Implementation of IVideoSurface::ApplyMatte(const Color& matteColor, Real matteThreshold = 0). More...
 
virtual Bool ApplyMatte (SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color &matteColor, Real matteThreshold=0)
 Implementation of IVideoSurface::ApplyMatte(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color& matteColor, Real matteThreshold = 0). More...
 
virtual Bool RenderText (const IFont *font, const String &text, const Color &textColor, const Color &backgroundColor, Bool clearSurface, Bool enableWordWrap, Real containerPosX, Real containerPosY, Real containerSizeX, Real containerSizeY, IEnums::TextAlignmentX alignX, IEnums::TextAlignmentY alignY)
 Implementation of IVideoSurface::RenderText(). More...
 
virtual Bool IsColumnEmpty (UInt32 column, Real threshold) const
 Implementation of IVideoSurface::IsColumnEmpty(). More...
 
virtual Bool IsRowEmpty (UInt32 row, Real threshold) const
 Implementation of IVideoSurface::IsRowEmpty(). More...
 
virtual SInt32 ClipSizeXRight (SInt32 positionX, SInt32 sizeX) const
 Implementation of IVideoSurface::ClipSizeXRight(). More...
 
virtual SInt32 ClipSizeYBottom (SInt32 positionY, SInt32 sizeY) const
 Implementation of IVideoSurface::ClipSizeYBottom(). More...
 
virtual Bool Evict ()
 Implementation of IVideoSurface::Evict(). More...
 
virtual Bool Restore ()
 Implementation of IVideoSurface::Restore(). More...
 
- Public Member Functions inherited from Murl::IVideoSurface
virtual ~IVideoSurface ()
 The destructor.
 

Protected Attributes

UInt32 mSizeX
 The pixel width. More...
 
UInt32 mSizeY
 The pixel height. More...
 
IEnums::PixelFormat mPixelFormat
 The pixel format. More...
 
UInt32 mBytesPerLine
 The number of bytes per line. More...
 
Data mData
 The own surface data, if specified via constructor. More...
 
ConstData mConstData
 The actually visible constant surface data store. More...
 
MutableData mMutableData
 The actually visible mutable surface data store, if possible. More...
 

Detailed Description

The video surface class, see IVideoSurface.

Constructor & Destructor Documentation

◆ VideoSurface() [1/9]

Murl::Util::VideoSurface::VideoSurface ( )

The default constructor.

Create an empty surface with unknown pixel format.

◆ VideoSurface() [2/9]

Murl::Util::VideoSurface::VideoSurface ( UInt32  pixelSizeX,
UInt32  pixelSizeY 
)

Constructor creating a surface of specified dimension.

Creates a surface with pixel format IEnums::PIXEL_FORMAT_R8_G8_B8_A8.

Parameters
pixelSizeXThe number of horizontal pixels.
pixelSizeYThe number of vertical pixels.

◆ VideoSurface() [3/9]

Murl::Util::VideoSurface::VideoSurface ( UInt32  pixelSizeX,
UInt32  pixelSizeY,
UInt32  bytesPerLine 
)

Constructor creating a surface of specified dimension, with given line pitch.

Creates a surface with pixel format IEnums::PIXEL_FORMAT_R8_G8_B8_A8.

Parameters
pixelSizeXThe number of horizontal pixels.
pixelSizeYThe number of vertical pixels.
bytesPerLineThe line pitch in bytes.

◆ VideoSurface() [4/9]

Murl::Util::VideoSurface::VideoSurface ( IEnums::PixelFormat  pixelFormat,
UInt32  pixelSizeX,
UInt32  pixelSizeY 
)

Constructor creating a surface of specified pixel format and dimension.

Parameters
pixelFormatThe pixel format.
pixelSizeXThe number of horizontal pixels.
pixelSizeYThe number of vertical pixels.

◆ VideoSurface() [5/9]

Murl::Util::VideoSurface::VideoSurface ( IEnums::PixelFormat  pixelFormat,
UInt32  pixelSizeX,
UInt32  pixelSizeY,
UInt32  bytesPerLine 
)

Constructor creating a surface of specified pixel format and dimension, with given line pitch.

Parameters
pixelFormatThe pixel format.
pixelSizeXThe number of horizontal pixels.
pixelSizeYThe number of vertical pixels.
bytesPerLineThe line pitch in bytes.

◆ VideoSurface() [6/9]

Murl::Util::VideoSurface::VideoSurface ( IEnums::PixelFormat  pixelFormat,
UInt32  pixelSizeX,
UInt32  pixelSizeY,
MutableData sourceData 
)

Constructor creating a surface of specified pixel format and dimension with given source data.

This constructor can be used to create a surface effectively wrapping a given block of mutable data without copying the source contents.

Parameters
pixelFormatThe pixel format.
pixelSizeXThe number of horizontal pixels.
pixelSizeYThe number of vertical pixels.
sourceDataThe mutable data block to be wrapped.

◆ VideoSurface() [7/9]

Murl::Util::VideoSurface::VideoSurface ( IEnums::PixelFormat  pixelFormat,
UInt32  pixelSizeX,
UInt32  pixelSizeY,
UInt32  bytesPerLine,
MutableData sourceData 
)

Constructor creating a surface of specified pixel format and dimension with given source data.

This constructor can be used to create a surface effectively wrapping a given block of mutable data without copying the source contents, using a given line pitch.

Parameters
pixelFormatThe pixel format.
pixelSizeXThe number of horizontal pixels.
pixelSizeYThe number of vertical pixels.
bytesPerLineThe line pitch in bytes.
sourceDataThe mutable data block to be wrapped.

◆ VideoSurface() [8/9]

Murl::Util::VideoSurface::VideoSurface ( IEnums::PixelFormat  pixelFormat,
UInt32  pixelSizeX,
UInt32  pixelSizeY,
const ConstData sourceData 
)

Constructor creating a surface of specified pixel format and dimension with given source data.

This constructor can be used to create a surface effectively wrapping a given block of constant data without copying the source contents.

Parameters
pixelFormatThe pixel format.
pixelSizeXThe number of horizontal pixels.
pixelSizeYThe number of vertical pixels.
sourceDataThe constant data block to be wrapped.

◆ VideoSurface() [9/9]

Murl::Util::VideoSurface::VideoSurface ( IEnums::PixelFormat  pixelFormat,
UInt32  pixelSizeX,
UInt32  pixelSizeY,
UInt32  bytesPerLine,
const ConstData sourceData 
)

Constructor creating a surface of specified pixel format and dimension with given source data.

This constructor can be used to create a surface effectively wrapping a given block of constant data without copying the source contents, using a given line pitch.

Parameters
pixelFormatThe pixel format.
pixelSizeXThe number of horizontal pixels.
pixelSizeYThe number of vertical pixels.
bytesPerLineThe line pitch in bytes.
sourceDataThe constant data block to be wrapped.

Member Function Documentation

◆ Clone() [1/3]

virtual IVideoSurface* Murl::Util::VideoSurface::Clone ( IEnums::PixelFormat  pixelFormat) const
virtual

Implementation of IVideoSurface::Clone(IEnums::PixelFormat pixelFormat).

Parameters
pixelFormatThe pixel format of the new surface.
Returns
The new surface or null if conversion is not available.

Implements Murl::IVideoSurface.

◆ Clone() [2/3]

virtual IVideoSurface* Murl::Util::VideoSurface::Clone ( UInt32  pixelSizeX,
UInt32  pixelSizeY,
const IVideoScaler scaler = 0,
Real  gamma = 1.0f 
) const
virtual

Implementation of IVideoSurface::Clone(IEnums::PixelFormat pixelFormat, const IVideoScaler* scaler = 0).

Parameters
pixelSizeXThe number of horizontal pixels of the new surface.
pixelSizeYThe number of vertical pixels of the new surface.
scalerPointer to a scaler object or null to scale using the BoxVideoScaler.
gammaThe gamma value used during cloning.
Returns
The new surface or null if conversion is not available.

Implements Murl::IVideoSurface.

◆ Clone() [3/3]

virtual IVideoSurface* Murl::Util::VideoSurface::Clone ( IEnums::PixelFormat  pixelFormat,
UInt32  pixelSizeX,
UInt32  pixelSizeY,
const IVideoScaler scaler = 0,
Real  gamma = 1.0f 
) const
virtual

Implementation of IVideoSurface::Clone(IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY, const IVideoScaler* scaler).

Parameters
pixelFormatThe pixel format of the new surface.
pixelSizeXThe number of horizontal pixels of the new surface.
pixelSizeYThe number of vertical pixels of the new surface.
scalerPointer to a scaler object or null to scale using the BoxVideoScaler.
gammaThe gamma value used during cloning.
Returns
The new surface or null if conversion is not available.

Implements Murl::IVideoSurface.

◆ CloneRotated() [1/2]

virtual IVideoSurface* Murl::Util::VideoSurface::CloneRotated ( IEnums::Orientation  orientation) const
virtual

Implementation of IVideoSurface::CloneRotated(IEnums::Orientation orientation).

Parameters
orientationThe orientation of the new surface.
Returns
The new surface or null if conversion is not available.

Implements Murl::IVideoSurface.

◆ CloneRotated() [2/2]

virtual IVideoSurface* Murl::Util::VideoSurface::CloneRotated ( IEnums::Orientation  orientation,
IEnums::PixelFormat  pixelFormat 
) const
virtual

Implementation of IVideoSurface::CloneRotated(IEnums::Orientation orientation, IEnums::PixelFormat pixelFormat).

Parameters
orientationThe orientation of the new surface.
pixelFormatThe pixel format of the new surface.
Returns
The new surface or null if conversion is not available.

Implements Murl::IVideoSurface.

◆ CloneFrame()

virtual IVideoSurface* Murl::Util::VideoSurface::CloneFrame ( SInt32  positionX,
SInt32  positionY,
UInt32  pixelSizeX,
UInt32  pixelSizeY 
) const
virtual

Implementation of IVideoSurface::CloneFrame().

Parameters
positionXThe source x-position of the region.
positionYThe source y-position of the region.
pixelSizeXThe number of horizontal pixels of the region.
pixelSizeYThe number of vertical pixels of the region.
Returns
The new surface with the specified region's size.

Implements Murl::IVideoSurface.

◆ GetPixelSizeX()

virtual UInt32 Murl::Util::VideoSurface::GetPixelSizeX ( ) const
virtual

Implementation of IVideoSurface::GetPixelSizeX().

Returns
The number of horizontal pixels.

Implements Murl::IVideoSurface.

◆ GetPixelSizeY()

virtual UInt32 Murl::Util::VideoSurface::GetPixelSizeY ( ) const
virtual

Implementation of IVideoSurface::GetPixelSizeY().

Returns
The number of vertical pixels.

Implements Murl::IVideoSurface.

◆ GetBytesPerPixel()

virtual UInt32 Murl::Util::VideoSurface::GetBytesPerPixel ( ) const
virtual

Implementation of IVideoSurface::GetBytesPerPixel().

Returns
The number of bytes per pixel.

Implements Murl::IVideoSurface.

◆ GetBytesPerLine()

virtual UInt32 Murl::Util::VideoSurface::GetBytesPerLine ( ) const
virtual

Implementation of IVideoSurface::GetBytesPerLine().

Returns
The number of bytes per line.

Implements Murl::IVideoSurface.

◆ GetPixelFormat()

virtual IEnums::PixelFormat Murl::Util::VideoSurface::GetPixelFormat ( ) const
virtual

Implementation of IVideoSurface::GetPixelFormat().

Returns
The pixel format of the surface.

Implements Murl::IVideoSurface.

◆ GetPixels()

virtual const ConstData& Murl::Util::VideoSurface::GetPixels ( ) const
virtual

Implementation of IVideoSurface::GetPixels().

Returns
The data object which is holding the pixels.

Implements Murl::IVideoSurface.

◆ GetMutablePixels()

virtual const MutableData& Murl::Util::VideoSurface::GetMutablePixels ( )
virtual

Implementation of IVideoSurface::GetMutablePixels().

Returns
The mutable data object which is holding the pixels.

Implements Murl::IVideoSurface.

Reimplemented in Murl::Util::EvictableVideoSurface.

◆ GetPixel()

virtual Color Murl::Util::VideoSurface::GetPixel ( SInt32  positionX,
SInt32  positionY 
) const
virtual

Implementation of IVideoSurface::GetPixel().

Parameters
positionXThe pixel x-position.
positionYThe pixel y-position.
Returns
The color of the pixel at the specified position.

Implements Murl::IVideoSurface.

◆ SetPixel()

virtual Bool Murl::Util::VideoSurface::SetPixel ( SInt32  positionX,
SInt32  positionY,
const Color color 
)
virtual

Implementation of IVideoSurface::SetPixel().

Parameters
positionXThe pixel x-position.
positionYThe pixel y-position.
colorThe color of the pixel to set.
Returns
true if successful.

Implements Murl::IVideoSurface.

◆ FlipX()

virtual Bool Murl::Util::VideoSurface::FlipX ( )
virtual

Implementation of IVideoSurface::FlipX().

Returns
true if successful.

Implements Murl::IVideoSurface.

Reimplemented in Murl::Util::EvictableVideoSurface.

◆ FlipY()

virtual Bool Murl::Util::VideoSurface::FlipY ( )
virtual

Implementation of IVideoSurface::FlipY().

Returns
true if successful.

Implements Murl::IVideoSurface.

Reimplemented in Murl::Util::EvictableVideoSurface.

◆ Blit() [1/2]

virtual Bool Murl::Util::VideoSurface::Blit ( const IVideoSurface source,
SInt32  destPositionX,
SInt32  destPositionY 
)
virtual

Implementation of IVideoSurface::Blit(const IVideoSurface* source, SInt32 destPositionX, SInt32 destPositionY).

Parameters
sourceThe source surface.
destPositionXThe destination x-position.
destPositionYThe destination y-position.
Returns
true if successful.

Implements Murl::IVideoSurface.

◆ Blit() [2/2]

virtual Bool Murl::Util::VideoSurface::Blit ( const IVideoSurface source,
SInt32  sourcePositionX,
SInt32  sourcePositionY,
SInt32  destPositionX,
SInt32  destPositionY,
UInt32  pixelSizeX,
UInt32  pixelSizeY 
)
virtual

Implementation of IVideoSurface::Blit(const IVideoSurface* source, SInt32 sourcePositionX, SInt32 sourcePositionY, SInt32 destPositionX, SInt32 destPositionY, UInt32 pixelSizeX, UInt32 pixelSizeY).

Parameters
sourceThe source surface.
sourcePositionXThe source x-position.
sourcePositionYThe source y-position.
destPositionXThe destination x-position.
destPositionYThe destination y-position.
pixelSizeXThe number of horizontal pixels to copy.
pixelSizeYThe number of vertical pixels to copy.
Returns
true if successful.

Implements Murl::IVideoSurface.

Reimplemented in Murl::Util::EvictableVideoSurface.

◆ BlitScaled()

virtual Bool Murl::Util::VideoSurface::BlitScaled ( const IVideoSurface source,
const IVideoScaler scaler = 0,
Real  gamma = 1.0f 
)
virtual

Implementation of IVideoSurface::BlitScaled().

Parameters
sourceThe source surface.
scalerPointer to a scaler object or null to scale using the BoxVideoScaler.
gammaThe gamma value used during scaling.
Returns
true if successful.

Implements Murl::IVideoSurface.

Reimplemented in Murl::Util::EvictableVideoSurface.

◆ Clear() [1/2]

virtual Bool Murl::Util::VideoSurface::Clear ( const Color clearColor)
virtual

Implementation of IVideoSurface::Clear(const Color& clearColor).

Parameters
clearColorThe clear color to apply.
Returns
true if successful.

Implements Murl::IVideoSurface.

◆ Clear() [2/2]

virtual Bool Murl::Util::VideoSurface::Clear ( SInt32  positionX,
SInt32  positionY,
UInt32  pixelSizeX,
UInt32  pixelSizeY,
const Color clearColor 
)
virtual

Implementation of IVideoSurface::Clear(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color& clearColor).

Parameters
positionXThe source x-position of the region.
positionYThe source y-position of the region.
pixelSizeXThe number of horizontal pixels of the region.
pixelSizeYThe number of vertical pixels of the region.
clearColorThe clear color to apply.
Returns
true if successful.

Implements Murl::IVideoSurface.

Reimplemented in Murl::Util::EvictableVideoSurface.

◆ GaussBlur() [1/2]

virtual Bool Murl::Util::VideoSurface::GaussBlur ( Real  strength)
virtual

Implementation of IVideoSurface::GaussBlur(Real strength).

Parameters
strengthThe blur filter strength.
Returns
true if successful.

Implements Murl::IVideoSurface.

◆ GaussBlur() [2/2]

virtual Bool Murl::Util::VideoSurface::GaussBlur ( SInt32  positionX,
SInt32  positionY,
UInt32  pixelSizeX,
UInt32  pixelSizeY,
Real  strength 
)
virtual

Implementation of IVideoSurface::GaussBlur(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, Real strength).

Parameters
positionXThe x-position of the region.
positionYThe y-position of the region.
pixelSizeXThe number of horizontal pixels of the region.
pixelSizeYThe number of vertical pixels of the region.
strengthThe blur filter strength.
Returns
true if successful.

Implements Murl::IVideoSurface.

Reimplemented in Murl::Util::EvictableVideoSurface.

◆ ApplyMatte() [1/2]

virtual Bool Murl::Util::VideoSurface::ApplyMatte ( const Color matteColor,
Real  matteThreshold = 0 
)
virtual

Implementation of IVideoSurface::ApplyMatte(const Color& matteColor, Real matteThreshold = 0).

Parameters
matteColorThe matte color to apply.
matteThresholdThe alpha threshold in range [0.0 .. 1.0].
Returns
true if successful.

Implements Murl::IVideoSurface.

◆ ApplyMatte() [2/2]

virtual Bool Murl::Util::VideoSurface::ApplyMatte ( SInt32  positionX,
SInt32  positionY,
UInt32  pixelSizeX,
UInt32  pixelSizeY,
const Color matteColor,
Real  matteThreshold = 0 
)
virtual

Implementation of IVideoSurface::ApplyMatte(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color& matteColor, Real matteThreshold = 0).

Parameters
positionXThe source x-position of the region.
positionYThe source y-position of the region.
pixelSizeXThe number of horizontal pixels of the region.
pixelSizeYThe number of vertical pixels of the region.
matteColorThe matte color to apply.
matteThresholdThe alpha threshold in range [0.0 .. 1.0].
Returns
true if successful.

Implements Murl::IVideoSurface.

Reimplemented in Murl::Util::EvictableVideoSurface.

◆ RenderText()

virtual Bool Murl::Util::VideoSurface::RenderText ( const IFont font,
const String text,
const Color textColor,
const Color backgroundColor,
Bool  clearSurface,
Bool  enableWordWrap,
Real  containerPosX,
Real  containerPosY,
Real  containerSizeX,
Real  containerSizeY,
IEnums::TextAlignmentX  alignX,
IEnums::TextAlignmentY  alignY 
)
virtual

Implementation of IVideoSurface::RenderText().

Parameters
fontThe font used for rendering.
textThe text to render.
textColorThe text color to render.
backgroundColorThe text background color to render.
clearSurfaceIf true, the output surface is cleared before rendering.
enableWordWrapIf true, word wrapping is enabled.
containerPosXThe horizontal text position in the video stream.
containerPosYThe vertical text position in the video stream.
containerSizeXThe horizontal size of the text rectangle, or 0 if the video stream's X size should be used
containerSizeYThe vertical size of the text rectangle, or 0 if the video stream's Y size should be used
alignXThe horizontal text alignment.
alignYThe vertical text alignment.
Returns
true if successful.

Implements Murl::IVideoSurface.

Reimplemented in Murl::Util::EvictableVideoSurface.

◆ IsColumnEmpty()

virtual Bool Murl::Util::VideoSurface::IsColumnEmpty ( UInt32  column,
Real  threshold 
) const
virtual

Implementation of IVideoSurface::IsColumnEmpty().

Parameters
columnThe zero-based column.
thresholdThe alpha threshold in range [0.0 .. 1.0].
Returns
true if all alpha values in the column are less or equal to the threshold.

Implements Murl::IVideoSurface.

◆ IsRowEmpty()

virtual Bool Murl::Util::VideoSurface::IsRowEmpty ( UInt32  row,
Real  threshold 
) const
virtual

Implementation of IVideoSurface::IsRowEmpty().

Parameters
rowThe zero-based row.
thresholdThe alpha threshold in range [0.0 .. 1.0].
Returns
true if all alpha values in the row are less or equal to the threshold.

Implements Murl::IVideoSurface.

◆ ClipSizeXRight()

virtual SInt32 Murl::Util::VideoSurface::ClipSizeXRight ( SInt32  positionX,
SInt32  sizeX 
) const
virtual

Implementation of IVideoSurface::ClipSizeXRight().

Parameters
positionXThe x-position.
sizeXThe number of horzontal pixels.
Returns
The clipped width.

Implements Murl::IVideoSurface.

◆ ClipSizeYBottom()

virtual SInt32 Murl::Util::VideoSurface::ClipSizeYBottom ( SInt32  positionY,
SInt32  sizeY 
) const
virtual

Implementation of IVideoSurface::ClipSizeYBottom().

Parameters
positionYThe y-position.
sizeYThe number of vertical pixels.
Returns
The clipped height.

Implements Murl::IVideoSurface.

◆ Evict()

virtual Bool Murl::Util::VideoSurface::Evict ( )
virtual

Implementation of IVideoSurface::Evict().

Returns
true if successful.

Implements Murl::IVideoSurface.

Reimplemented in Murl::Util::EvictableVideoSurface.

◆ Restore()

virtual Bool Murl::Util::VideoSurface::Restore ( )
virtual

Implementation of IVideoSurface::Restore().

Returns
true if successful.

Implements Murl::IVideoSurface.

Reimplemented in Murl::Util::EvictableVideoSurface.

Member Data Documentation

◆ mSizeX

UInt32 Murl::Util::VideoSurface::mSizeX
protected

The pixel width.

◆ mSizeY

UInt32 Murl::Util::VideoSurface::mSizeY
protected

The pixel height.

◆ mPixelFormat

IEnums::PixelFormat Murl::Util::VideoSurface::mPixelFormat
protected

The pixel format.

◆ mBytesPerLine

UInt32 Murl::Util::VideoSurface::mBytesPerLine
protected

The number of bytes per line.

◆ mData

Data Murl::Util::VideoSurface::mData
protected

The own surface data, if specified via constructor.

◆ mConstData

ConstData Murl::Util::VideoSurface::mConstData
protected

The actually visible constant surface data store.

◆ mMutableData

MutableData Murl::Util::VideoSurface::mMutableData
protected

The actually visible mutable surface data store, if possible.


The documentation for this class was generated from the following file:
  • murl_util_video_surface.h


Copyright © 2011-2018 Spraylight GmbH.