Partager via


DXSAMPLEFORMATENUM enumeration

Indicates the pixel format of a DXSurface object. This enumerated type is returned by the IDXARGBReadPtr::GetNativeType and IDXSurface::GetPixelFormat methods.

Syntax

typedef enum DXSAMPLEFORMATENUM { 
  DXPF_FLAGSMASK     = ( 0x FFFF0000 ),
  DXPF_NONPREMULT    = ( 0x00010000 ),
  DXPF_TRANSPARENCY  = ( 0x00020000 ),
  DXPF_TRANSLUCENCY  = ( 0x00040000 ),
  DXPF_2BITERROR     = ( 0x00200000 ),
  DXPF_3BITERROR     = ( 0x00300000 ),
  DXPF_4BITERROR     = ( 0x00400000 ),
  DXPF_5BITERROR     = ( 0x00500000 ),
  DXPF_ERRORMASK     = ( 0x00700000 ),
  DXPF_NONSTANDARD   = ( 0 ),
  DXPF_PMARGB32      = ( 1 | DXPF_TRANSPARENCY | DXPF_TRANSLUCENCY ),
  DXPF_ARGB32        = ( 2 | DXPF_NONPREMULT | DXPF_TRANSPARENCY | DXPF_TRANSLUCENCY ),
  DXPF_ARGB4444      = ( 3 | DXPF_NONPREMULT | DXPF_TRANSPARENCY | DXPF_TRANSLUCENCY | DXPF_4BITERROR ),
  DXPF_A8            = ( 4 | DXPF_TRANSPARENCY | DXPF_TRANSLUCENCY ),
  DXPF_RGB32         = ( 5 ),
  DXPF_RGB24         = ( 6 ),
  DXPF_RGB565        = ( 7 | DXPF_3BITERROR ),
  DXPF_RGB555        = ( 8 | DXPF_3BITERROR ),
  DXPF_RGB8          = ( 9 | DXPF_5BITERROR ),
  DXPF_ARGB1555      = ( 10 | DXPF_TRANSPARENCY | DXPF_3BITERROR ),
  DXPF_RGB32_CK      = ( DXPF_RGB32 | DXPF_TRANSPARENCY ),
  DXPF_RGB24_CK      = ( DXPF_RGB24 | DXPF_TRANSPARENCY ),
  DXPF_RGB555_CK     = ( DXPF_RGB555 | DXPF_TRANSPARENCY ),
  DXPF_RGB565_CK     = ( DXPF_RGB565 | DXPF_TRANSPARENCY ),
  DXPF_RGB8_CK       = ( DXPF_RGB8 | DXPF_TRANSPARENCY )
} DXSAMPLEFORMATENUM;

Constants

  • DXPF_FLAGSMASK
    Mask that specifies which bits of the longword are used to indicate transparency and dithering options.

  • DXPF_NONPREMULT
    Flag that indicates that the pixel format is not alpha premultiplied.

  • DXPF_TRANSPARENCY
    Flag that indicates that the surface uses a color keys for transparency.

  • DXPF_TRANSLUCENCY
    Flag that indicates that the pixel format uses 8-bit alpha values.

  • DXPF_2BITERROR
    Flag that indicates that the surface uses a 2-bit error term for dithering.

  • DXPF_3BITERROR
    Flag that indicates that the surface uses a 3-bit error term for dithering.

  • DXPF_4BITERROR
    Flag that indicates that the surface uses a 4-bit error term for dithering.

  • DXPF_5BITERROR
    Flag that indicates that the surface uses a 5-bit error term for dithering.

  • DXPF_ERRORMASK
    Mask of all bits used for dithering.

  • DXPF_NONSTANDARD
    Flag that indicates that the surface pixel format is not one of the formats listed here. This flag can be combined with DXPF_NONPREMULT, if operations on the surface are more efficient with a pixel format that is not alpha premultiplied.

  • DXPF_PMARGB32
    A 32-bit pixel format, with eight bits each of alpha, red, green, and blue. The bits are stored in this order, with the alpha stored in the higher-order bits and the blue in the lower-order bits. For this format, the color values are alpha premultiplied.

  • DXPF_ARGB32
    A 32-bit pixel format, with eight bits each of alpha, red, green, and blue. The bits are stored in this order, with the alpha stored in the higher-order bits and the blue in the lower-order bits.

  • DXPF_ARGB4444
    A 16-bit pixel format, with four bits each of alpha, red, green, and blue.

  • DXPF_A8
    An 8-bit pixel format that stores only alpha values.

  • DXPF_RGB32
    A 32-bit pixel format, with eight bits each of red, green, and blue. This is essentially a 24-bit version of DXPF_ARGB32, with no alpha values.

  • DXPF_RGB24
    A 24 bit pixel format, with eight bits each of red, green, and blue.

  • DXPF_RGB565
    A 16-bit pixel format that uses five bits for red, six bits for green, and five bits for blue.

  • DXPF_RGB555
    A 16-bit pixel format that uses five bits for red, five bits for green, and five bits for blue. The highest-order bit is ignored.

  • DXPF_RGB8
    An 8-bit pixel format, where each value refers to a color in a palette.

  • DXPF_ARGB1555
    A 16-bit pixel format that uses five bits for red, five bits for green, and five bits for blue. The last bit is used to flag a pixel as transparent.

  • DXPF_RGB32_CK
    Same format as DXPF_RGB32 and uses a color key for transparency.

  • DXPF_RGB24_CK
    Same format as DXPF_RGB24 and uses a color key for transparency.

  • DXPF_RGB555_CK
    Same format as DXPF_RGB555 and uses a color key for transparency.

  • DXPF_RGB565_CK
    Same format as DXPF_RGB565 and uses a color key for transparency.

  • DXPF_RGB8_CK
    Same format as DXPF_RGB8 and uses a color key for transparency.

Remarks

You can use the mask to determine the pixel format of the IDXSurface and any dithering or transparency options used for rendering.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

Dxtrans.h

IDL

Dxtrans.idl