TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
List of all members
iPixelFormat Struct Referenceabstract
Inheritance diagram for iPixelFormat:
iUnknown

Detailed Description

Pixel Format interface.

General

virtual tBool IsSamePixelFormat (const iPixelFormat *pPixFmt) const =0
 Test if the given pixel format is the same as this pixel format. More...
 
virtual tU32 GetNumParameters () const =0
 Get the number of parameters of the pixel format. {Property}. More...
 
virtual tBool SetParameter (tU32 ulParameter, tU32 ulValue)=0
 Set a parameter of the pixel format. {Property}. More...
 
virtual tU32 GetParameter (tU32 ulParameter) const =0
 Get a parameter of the pixel format. {Property}. More...
 
virtual iPixelFormatClone () const =0
 Clone the pixel format. More...
 
virtual const acharGetFormat () const =0
 Get the pixel format, format string. {Property}. More...
 
virtual ePixelFormatCaps GetCaps () const =0
 Get the pixel format capabilities. {Property}. More...
 
virtual tU32 GetBitsPerPixel () const =0
 Get the number of bits per pixel. {Property}. More...
 
virtual tU32 GetBytesPerPixel () const =0
 Get the number of bytes per pixel. {Property}. More...
 
virtual tU32 GetSize (tU32 ulW, tU32 ulH, tU32 ulD) const =0
 Get the size in bytes of a surface using this pixel format. More...
 
virtual tU32 GetNumComponents () const =0
 Get the number of components of the pixel format. {Property}. More...
 
virtual tU32 GetNumRBits () const =0
 Get the number of red bits. {Property}. More...
 
virtual tU32 GetNumGBits () const =0
 Get the number of green bits. {Property}. More...
 
virtual tU32 GetNumBBits () const =0
 Get the number of blue bits. {Property}. More...
 
virtual tU32 GetNumABits () const =0
 Get the number of alpha bits. {Property}. More...
 

Pixel packing

virtual tPtr BuildPixelub (tPtr pOut, tU8 r, tU8 g, tU8 b, tU8 a=0) const =0
 Build a pixel using unsigned byte values. More...
 
virtual tPtr BuildPixelus (tPtr pOut, tU16 r, tU16 g, tU16 b, tU16 a=0) const =0
 Build a pixel using unsigned short values. More...
 
virtual tPtr BuildPixelul (tPtr pOut, tU32 r, tU32 g, tU32 b, tU32 a=0) const =0
 Build a pixel using unsigned short values. More...
 
virtual tPtr BuildPixelf (tPtr pOut, tF32 r, tF32 g, tF32 b, tF32 a=0.0f) const =0
 Build a pixel using floating point values. More...
 

Pixels unpacking

virtual tPtr BeginUnpackPixels (tPtr pSurface, tU32 ulPitch, tU32 ulX, tU32 ulY, tU32 ulW, tU32 ulH)=0
 Begin pixel unpacking. More...
 
virtual void EndUnpackPixels ()=0
 End pixel unpacking. More...
 
virtual sColor4ub UnpackPixelub (tPtr pColor) const =0
 Unpack a pixel in an unsigned byte color. More...
 
virtual sVec4i UnpackPixelus (tPtr pColor) const =0
 Unpack a pixel in an unsigned short color. More...
 
virtual sVec4i UnpackPixelul (tPtr pColor) const =0
 Unpack a pixel in an unsigned long color. More...
 
virtual sColor4f UnpackPixelf (tPtr pColor) const =0
 Unpack a pixel in a floating point color. More...
 

Blitting

virtual tBool Clear (tPtr pDst, tU32 ulDestPitch, tU32 dx, tU32 dy, tU32 w, tU32 h, tPtr apClearColor)=0
 Clear a surface with a specified color. More...
 
virtual tBool Blit (tPtr pDst, tU32 ulDestPitch, tU32 dx, tU32 dy, tPtr pSrc, tU32 ulSrcPitch, iPixelFormat *pSrcFmt, tU32 sx, tU32 sy, tU32 w, tU32 h, ePixelFormatBlit blitFlags) const =0
 Blit a surface of any pixel format to a surface of this pixel format. More...
 
virtual tBool BlitStretch (tPtr pDst, tU32 ulDestPitch, tU32 ulDestWidth, tU32 ulDestHeight, tU32 dx, tU32 dy, tU32 dw, tU32 dh, tPtr pSrc, tU32 ulSrcPitch, iPixelFormat *pSrcFmt, tU32 sx, tU32 sy, tU32 sw, tU32 sh) const =0
 Blit stretch a surface of any pixel format to a surface of this pixel format. More...
 
virtual tBool BlitAlpha (tPtr pDst, tU32 ulDestPitch, tU32 dx, tU32 dy, tPtr pSrc, tU32 ulSrcPitch, iPixelFormat *pSrcFmt, tU32 sx, tU32 sy, tU32 w, tU32 h, ePixelFormatBlit blitFlags, const sColor4f &aSourceColor, const sColor4f &aDestColor, eBlendMode aBlendMode) const =0
 Blit a surface of any pixel format to a surface of this pixel format. More...
 
virtual tBool BlitAlphaStretch (tPtr pDst, tU32 ulDestPitch, tU32 ulDestWidth, tU32 ulDestHeight, tU32 dx, tU32 dy, tU32 dw, tU32 dh, tPtr pSrc, tU32 ulSrcPitch, iPixelFormat *pSrcFmt, tU32 sx, tU32 sy, tU32 sw, tU32 sh, const sColor4f &aSourceColor, const sColor4f &aDestColor, eBlendMode aBlendMode) const =0
 Blit stretch a surface of any pixel format to a surface of this pixel format. More...
 

Additional Inherited Members

- Public Member Functions inherited from iUnknown
virtual tBool IsOK () const =0
 Check if the object is valid. More...
 
virtual tI32 AddRef ()=0
 Signal that one more reference of the object has been created. More...
 
virtual tI32 Release ()=0
 Release a reference of the object. More...
 
virtual void DeleteThis ()=0
 Bypass any reference counting and delete this object. More...
 
virtual void Invalidate ()=0
 Invalidate the object. More...
 
virtual iUnknownQueryInterface (const tUUID &aIID)=0
 Query an interface. More...
 
virtual void ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0
 Fill a UUID list containing the UUIDs of the implemented interfaces. More...
 
virtual tI32 SetNumRefs (tI32 anNumRefs)=0
 Set the reference counter directly. More...
 
virtual tI32 GetNumRefs () const =0
 Get the number of references to this object. More...
 

Member Function Documentation

virtual tBool IsSamePixelFormat ( const iPixelFormat pPixFmt) const
pure virtual

Test if the given pixel format is the same as this pixel format.

virtual tU32 GetNumParameters ( ) const
pure virtual

Get the number of parameters of the pixel format. {Property}.

virtual tBool SetParameter ( tU32  ulParameter,
tU32  ulValue 
)
pure virtual

Set a parameter of the pixel format. {Property}.

virtual tU32 GetParameter ( tU32  ulParameter) const
pure virtual

Get a parameter of the pixel format. {Property}.

virtual iPixelFormat* Clone ( ) const
pure virtual

Clone the pixel format.

virtual const achar* GetFormat ( ) const
pure virtual

Get the pixel format, format string. {Property}.

virtual ePixelFormatCaps GetCaps ( ) const
pure virtual

Get the pixel format capabilities. {Property}.

virtual tU32 GetBitsPerPixel ( ) const
pure virtual

Get the number of bits per pixel. {Property}.

virtual tU32 GetBytesPerPixel ( ) const
pure virtual

Get the number of bytes per pixel. {Property}.

virtual tU32 GetSize ( tU32  ulW,
tU32  ulH,
tU32  ulD 
) const
pure virtual

Get the size in bytes of a surface using this pixel format.

virtual tU32 GetNumComponents ( ) const
pure virtual

Get the number of components of the pixel format. {Property}.

virtual tU32 GetNumRBits ( ) const
pure virtual

Get the number of red bits. {Property}.

virtual tU32 GetNumGBits ( ) const
pure virtual

Get the number of green bits. {Property}.

virtual tU32 GetNumBBits ( ) const
pure virtual

Get the number of blue bits. {Property}.

virtual tU32 GetNumABits ( ) const
pure virtual

Get the number of alpha bits. {Property}.

virtual tPtr BuildPixelub ( tPtr  pOut,
tU8  r,
tU8  g,
tU8  b,
tU8  a = 0 
) const
pure virtual

Build a pixel using unsigned byte values.

virtual tPtr BuildPixelus ( tPtr  pOut,
tU16  r,
tU16  g,
tU16  b,
tU16  a = 0 
) const
pure virtual

Build a pixel using unsigned short values.

virtual tPtr BuildPixelul ( tPtr  pOut,
tU32  r,
tU32  g,
tU32  b,
tU32  a = 0 
) const
pure virtual

Build a pixel using unsigned short values.

virtual tPtr BuildPixelf ( tPtr  pOut,
tF32  r,
tF32  g,
tF32  b,
tF32  a = 0.0f 
) const
pure virtual

Build a pixel using floating point values.

virtual tPtr BeginUnpackPixels ( tPtr  pSurface,
tU32  ulPitch,
tU32  ulX,
tU32  ulY,
tU32  ulW,
tU32  ulH 
)
pure virtual

Begin pixel unpacking.

virtual void EndUnpackPixels ( )
pure virtual

End pixel unpacking.

virtual sColor4ub UnpackPixelub ( tPtr  pColor) const
pure virtual

Unpack a pixel in an unsigned byte color.

virtual sVec4i UnpackPixelus ( tPtr  pColor) const
pure virtual

Unpack a pixel in an unsigned short color.

Remarks
Return a Vec4i in with member in the 0-0xFFFF range.
virtual sVec4i UnpackPixelul ( tPtr  pColor) const
pure virtual

Unpack a pixel in an unsigned long color.

virtual sColor4f UnpackPixelf ( tPtr  pColor) const
pure virtual

Unpack a pixel in a floating point color.

virtual tBool Clear ( tPtr  pDst,
tU32  ulDestPitch,
tU32  dx,
tU32  dy,
tU32  w,
tU32  h,
tPtr  apClearColor 
)
pure virtual

Clear a surface with a specified color.

virtual tBool Blit ( tPtr  pDst,
tU32  ulDestPitch,
tU32  dx,
tU32  dy,
tPtr  pSrc,
tU32  ulSrcPitch,
iPixelFormat pSrcFmt,
tU32  sx,
tU32  sy,
tU32  w,
tU32  h,
ePixelFormatBlit  blitFlags 
) const
pure virtual

Blit a surface of any pixel format to a surface of this pixel format.

virtual tBool BlitStretch ( tPtr  pDst,
tU32  ulDestPitch,
tU32  ulDestWidth,
tU32  ulDestHeight,
tU32  dx,
tU32  dy,
tU32  dw,
tU32  dh,
tPtr  pSrc,
tU32  ulSrcPitch,
iPixelFormat pSrcFmt,
tU32  sx,
tU32  sy,
tU32  sw,
tU32  sh 
) const
pure virtual

Blit stretch a surface of any pixel format to a surface of this pixel format.

virtual tBool BlitAlpha ( tPtr  pDst,
tU32  ulDestPitch,
tU32  dx,
tU32  dy,
tPtr  pSrc,
tU32  ulSrcPitch,
iPixelFormat pSrcFmt,
tU32  sx,
tU32  sy,
tU32  w,
tU32  h,
ePixelFormatBlit  blitFlags,
const sColor4f aSourceColor,
const sColor4f aDestColor,
eBlendMode  aBlendMode 
) const
pure virtual

Blit a surface of any pixel format to a surface of this pixel format.

Remarks
The source and destination color are used to replace missing components in the source/destination format.
If the passed blending mode is not supported the method will return false to be handled by the reference implementation.
virtual tBool BlitAlphaStretch ( tPtr  pDst,
tU32  ulDestPitch,
tU32  ulDestWidth,
tU32  ulDestHeight,
tU32  dx,
tU32  dy,
tU32  dw,
tU32  dh,
tPtr  pSrc,
tU32  ulSrcPitch,
iPixelFormat pSrcFmt,
tU32  sx,
tU32  sy,
tU32  sw,
tU32  sh,
const sColor4f aSourceColor,
const sColor4f aDestColor,
eBlendMode  aBlendMode 
) const
pure virtual

Blit stretch a surface of any pixel format to a surface of this pixel format.

Remarks
The source and destination color are used to replace missing components in the source/destination format.
If the passed blending mode is not supported the method will return false to be handled by the reference implementation.