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...
 
 ~VideoSurface () override
 The destructor.
 
IVideoSurfaceClone (IEnums::PixelFormat pixelFormat) const override
 Implementation of IVideoSurface::Clone(IEnums::PixelFormat pixelFormat). More...
 
IVideoSurfaceClone (UInt32 pixelSizeX, UInt32 pixelSizeY, const IVideoScaler *scaler=nullptr, Real gamma=1.0f) const override
 Implementation of IVideoSurface::Clone(IEnums::PixelFormat pixelFormat, const IVideoScaler* scaler = 0). More...
 
IVideoSurfaceClone (IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY, const IVideoScaler *scaler=nullptr, Real gamma=1.0f) const override
 Implementation of IVideoSurface::Clone(IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY, const IVideoScaler* scaler). More...
 
IVideoSurfaceCloneRotated (IEnums::Orientation orientation) const override
 Implementation of IVideoSurface::CloneRotated(IEnums::Orientation orientation). More...
 
IVideoSurfaceCloneRotated (IEnums::Orientation orientation, IEnums::PixelFormat pixelFormat) const override
 Implementation of IVideoSurface::CloneRotated(IEnums::Orientation orientation, IEnums::PixelFormat pixelFormat). More...
 
IVideoSurfaceCloneFrame (SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY) const override
 Implementation of IVideoSurface::CloneFrame(). More...
 
UInt32 GetPixelSizeX () const override
 Implementation of IVideoSurface::GetPixelSizeX(). More...
 
UInt32 GetPixelSizeY () const override
 Implementation of IVideoSurface::GetPixelSizeY(). More...
 
UInt32 GetBytesPerPixel () const override
 Implementation of IVideoSurface::GetBytesPerPixel(). More...
 
UInt32 GetBytesPerLine () const override
 Implementation of IVideoSurface::GetBytesPerLine(). More...
 
IEnums::PixelFormat GetPixelFormat () const override
 Implementation of IVideoSurface::GetPixelFormat(). More...
 
const ConstDataGetPixels () const override
 Implementation of IVideoSurface::GetPixels(). More...
 
const MutableDataGetMutablePixels () override
 Implementation of IVideoSurface::GetMutablePixels(). More...
 
Color GetPixel (SInt32 positionX, SInt32 positionY) const override
 Implementation of IVideoSurface::GetPixel(). More...
 
Bool SetPixel (SInt32 positionX, SInt32 positionY, const Color &color) override
 Implementation of IVideoSurface::SetPixel(). More...
 
Bool FlipX () override
 Implementation of IVideoSurface::FlipX(). More...
 
Bool FlipY () override
 Implementation of IVideoSurface::FlipY(). More...
 
Bool Blit (const IVideoSurface *source, SInt32 destPositionX, SInt32 destPositionY) override
 Implementation of IVideoSurface::Blit(const IVideoSurface* source, SInt32 destPositionX, SInt32 destPositionY). More...
 
Bool Blit (const IVideoSurface *source, SInt32 sourcePositionX, SInt32 sourcePositionY, SInt32 destPositionX, SInt32 destPositionY, UInt32 pixelSizeX, UInt32 pixelSizeY) override
 Implementation of IVideoSurface::Blit(const IVideoSurface* source, SInt32 sourcePositionX, SInt32 sourcePositionY, SInt32 destPositionX, SInt32 destPositionY, UInt32 pixelSizeX, UInt32 pixelSizeY). More...
 
Bool BlitScaled (const IVideoSurface *source, const IVideoScaler *scaler=nullptr, Real gamma=1.0f) override
 Implementation of IVideoSurface::BlitScaled(). More...
 
Bool Clear (const Color &clearColor) override
 Implementation of IVideoSurface::Clear(const Color& clearColor). More...
 
Bool Clear (SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color &clearColor) override
 Implementation of IVideoSurface::Clear(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color& clearColor). More...
 
Bool GaussBlur (Real strength) override
 Implementation of IVideoSurface::GaussBlur(Real strength). More...
 
Bool GaussBlur (SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, Real strength) override
 Implementation of IVideoSurface::GaussBlur(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, Real strength). More...
 
Bool Dither (UInt32 redBits, UInt32 greenBits, UInt32 blueBits, UInt32 alphaBits) override
 Implementation of IVideoSurface::Dither(UInt32 redBits, UInt32 greenBits, UInt32 blueBits, UInt32 alphaBits). More...
 
Bool Dither (SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, UInt32 redBits, UInt32 greenBits, UInt32 blueBits, UInt32 alphaBits) override
 Implementation of IVideoSurface::Dither(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, UInt32 redBits, UInt32 greenBits, UInt32 blueBits, UInt32 alphaBits). More...
 
Bool ApplyMatteFringe (UInt32 matteFringe, Real matteThreshold=0) override
 Implementation of IVideoSurface::ApplyMatteFringe(const Color& matteColor, Real matteThreshold = 0). More...
 
Bool ApplyMatteFringe (SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, UInt32 matteFringe, Real matteThreshold=0) override
 Implementation of IVideoSurface::ApplyMatteFringe(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color& matteColor, Real matteThreshold = 0). More...
 
Bool ApplyMatteColor (const Color &matteColor, Real matteThreshold=0) override
 Implementation of IVideoSurface::ApplyMatteColor(const Color& matteColor, Real matteThreshold = 0). More...
 
Bool ApplyMatteColor (SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color &matteColor, Real matteThreshold=0) override
 Implementation of IVideoSurface::ApplyMatteColor(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color& matteColor, Real matteThreshold = 0). More...
 
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) override
 Implementation of IVideoSurface::RenderText(). More...
 
Bool IsColumnEmpty (UInt32 column, Real threshold) const override
 Implementation of IVideoSurface::IsColumnEmpty(). More...
 
Bool IsRowEmpty (UInt32 row, Real threshold) const override
 Implementation of IVideoSurface::IsRowEmpty(). More...
 
SInt32 ClipSizeXRight (SInt32 positionX, SInt32 sizeX) const override
 Implementation of IVideoSurface::ClipSizeXRight(). More...
 
SInt32 ClipSizeYBottom (SInt32 positionY, SInt32 sizeY) const override
 Implementation of IVideoSurface::ClipSizeYBottom(). More...
 
Bool Evict () override
 Implementation of IVideoSurface::Evict(). More...
 
Bool Restore () override
 Implementation of IVideoSurface::Restore(). More...
 
void CollectObjectStatistics (IObjectStatistics *stat) const override
 Implementation of IStatisticsObject::CollectObjectStatistics(). More...
 
- Public Member Functions inherited from Murl::IVideoSurface
 ~IVideoSurface () override
 The destructor.
 

Protected Attributes

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

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]

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

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]

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

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]

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

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]

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

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]

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

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

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

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

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

Implementation of IVideoSurface::GetPixelSizeX().

Returns
The number of horizontal pixels.

Implements Murl::IVideoSurface.

◆ GetPixelSizeY()

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

Implementation of IVideoSurface::GetPixelSizeY().

Returns
The number of vertical pixels.

Implements Murl::IVideoSurface.

◆ GetBytesPerPixel()

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

Implementation of IVideoSurface::GetBytesPerPixel().

Returns
The number of bytes per pixel.

Implements Murl::IVideoSurface.

◆ GetBytesPerLine()

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

Implementation of IVideoSurface::GetBytesPerLine().

Returns
The number of bytes per line.

Implements Murl::IVideoSurface.

◆ GetPixelFormat()

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

Implementation of IVideoSurface::GetPixelFormat().

Returns
The pixel format of the surface.

Implements Murl::IVideoSurface.

◆ GetPixels()

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

Implementation of IVideoSurface::GetPixels().

Returns
The data object which is holding the pixels.

Implements Murl::IVideoSurface.

◆ GetMutablePixels()

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

Implementation of IVideoSurface::GetMutablePixels().

Returns
The mutable data object which is holding the pixels.

Implements Murl::IVideoSurface.

◆ GetPixel()

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

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

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

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

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

Implementation of IVideoSurface::FlipX().

Returns
true if successful.

Implements Murl::IVideoSurface.

◆ FlipY()

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

Implementation of IVideoSurface::FlipY().

Returns
true if successful.

Implements Murl::IVideoSurface.

◆ Blit() [1/2]

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

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]

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

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.

◆ BlitScaled()

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

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.

◆ Clear() [1/2]

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

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

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

Implements Murl::IVideoSurface.

◆ Clear() [2/2]

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

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.

◆ GaussBlur() [1/2]

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

Implementation of IVideoSurface::GaussBlur(Real strength).

Parameters
strengthThe blur filter strength.
Returns
true if successful.

Implements Murl::IVideoSurface.

◆ GaussBlur() [2/2]

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

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.

◆ Dither() [1/2]

Bool Murl::Util::VideoSurface::Dither ( UInt32  redBits,
UInt32  greenBits,
UInt32  blueBits,
UInt32  alphaBits 
)
overridevirtual

Implementation of IVideoSurface::Dither(UInt32 redBits, UInt32 greenBits, UInt32 blueBits, UInt32 alphaBits).

Parameters
redBitsThe number of significant bits for the red component.
greenBitsThe number of significant bits for the green component.
blueBitsThe number of significant bits for the blue component.
alphaBitsThe number of significant bits for the alpha component.
Returns
true if successful.

Implements Murl::IVideoSurface.

◆ Dither() [2/2]

Bool Murl::Util::VideoSurface::Dither ( SInt32  positionX,
SInt32  positionY,
UInt32  pixelSizeX,
UInt32  pixelSizeY,
UInt32  redBits,
UInt32  greenBits,
UInt32  blueBits,
UInt32  alphaBits 
)
overridevirtual

Implementation of IVideoSurface::Dither(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, UInt32 redBits, UInt32 greenBits, UInt32 blueBits, UInt32 alphaBits).

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.
redBitsThe number of significant bits for the red component.
greenBitsThe number of significant bits for the green component.
blueBitsThe number of significant bits for the blue component.
alphaBitsThe number of significant bits for the alpha component.
Returns
true if successful.

Implements Murl::IVideoSurface.

◆ ApplyMatteFringe() [1/2]

Bool Murl::Util::VideoSurface::ApplyMatteFringe ( UInt32  matteFringe,
Real  matteThreshold = 0 
)
overridevirtual

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

Parameters
matteFringeThe matte fringe size to apply.
matteThresholdThe alpha threshold in range [0.0 .. 1.0].
Returns
true if successful.

Implements Murl::IVideoSurface.

◆ ApplyMatteFringe() [2/2]

Bool Murl::Util::VideoSurface::ApplyMatteFringe ( SInt32  positionX,
SInt32  positionY,
UInt32  pixelSizeX,
UInt32  pixelSizeY,
UInt32  matteFringe,
Real  matteThreshold = 0 
)
overridevirtual

Implementation of IVideoSurface::ApplyMatteFringe(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.
matteFringeThe matte fringe size to apply.
matteThresholdThe alpha threshold in range [0.0 .. 1.0].
Returns
true if successful.

Implements Murl::IVideoSurface.

◆ ApplyMatteColor() [1/2]

Bool Murl::Util::VideoSurface::ApplyMatteColor ( const Color matteColor,
Real  matteThreshold = 0 
)
overridevirtual

Implementation of IVideoSurface::ApplyMatteColor(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.

◆ ApplyMatteColor() [2/2]

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

Implementation of IVideoSurface::ApplyMatteColor(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.

◆ RenderText()

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

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.

◆ IsColumnEmpty()

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

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

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

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

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

Implementation of IVideoSurface::ClipSizeXRight().

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

Implements Murl::IVideoSurface.

◆ ClipSizeYBottom()

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

Implementation of IVideoSurface::ClipSizeYBottom().

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

Implements Murl::IVideoSurface.

◆ Evict()

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

Implementation of IVideoSurface::Evict().

Returns
true if successful.

Implements Murl::IVideoSurface.

◆ Restore()

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

Implementation of IVideoSurface::Restore().

Returns
true if successful.

Implements Murl::IVideoSurface.

◆ CollectObjectStatistics()

void Murl::Util::VideoSurface::CollectObjectStatistics ( IObjectStatistics *  stat) const
override

Implementation of IStatisticsObject::CollectObjectStatistics().

Parameters
statThe object statistics container.

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


Copyright © 2011-2024 Spraylight GmbH.