Package pyffi :: Package formats :: Package dds :: Class DdsFormat
[hide private]
[frames] | no frames]

Class DdsFormat

source code

              object --+        
                       |        
object_models.FileFormat --+    
                           |    
object_models.xml.FileFormat --+
                               |
                              DdsFormat

This class implements the DDS format.
Nested Classes [hide private]
  int
Basic implementation of a 32-bit signed integer type.
  uint
Implementation of a 32-bit unsigned integer type.
  byte
Implementation of a 8-bit signed integer type.
  ubyte
Implementation of a 8-bit unsigned integer type.
  char
Implementation of an (unencoded) 8-bit character.
  short
Implementation of a 16-bit signed integer type.
  ushort
Implementation of a 16-bit unsigned integer type.
  float
Implementation of a 32-bit float.
  PixelData
Basic type for undecoded data trailing at the end of a file.
  HeaderString
Basic type which implements the header of a DDS file.
  Data
A class to contain the actual dds data.
  Caps1
  Caps2
  FourCC
An unsigned 32-bit integer, describing the compression type.
  Header
  HeaderFlags
  PixelFormat
  PixelFormatFlags
  bool

Inherited from object_models.xml.FileFormat: __metaclass__

Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]

Inherited from object_models.xml.FileFormat: vercondFilter

Inherited from object_models.FileFormat: name_attribute, name_class, name_parts, walk, walkData

Static Methods [hide private]
 
version_number(version_str)
Converts version string into an integer.
source code
Class Variables [hide private]
  xml_file_name = 'dds.xml'
Override.
  xml_file_path = [None, '/usr/lib/python2.7/site-packages/pyffi...
Override.
  RE_FILENAME = re.compile(r'(?i)^.*\.dds$')
Override this with a regular expression (the result of a re.compile call) for the file extension of the format you are implementing.
  _EPSILON = 0.0001
  games = {}
  versions = {'DX10': 167772160, 'DX9': 150994944}
  xml_alias = [<class 'pyffi.formats.dds.bool'>]
  xml_bit_struct = [<class 'pyffi.formats.dds.HeaderFlags'>, <cl...
  xml_enum = [<class 'pyffi.formats.dds.FourCC'>]
  xml_struct = [<class 'pyffi.formats.dds.PixelFormat'>, <class ...

Inherited from object_models.xml.FileFormat: logger

Inherited from object_models.FileFormat: ARCHIVE_CLASSES

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

version_number(version_str)
Static Method

source code 

Converts version string into an integer.

>>> hex(DdsFormat.version_number('DX10'))
'0xa000000'
Parameters:
  • version_str (str) - The version string.
Returns:
A version integer.
Overrides: object_models.FileFormat.version_number

Class Variable Details [hide private]

xml_file_path

Override.
Value:
[None, '/usr/lib/python2.7/site-packages/pyffi/formats/dds']

xml_bit_struct

Value:
[<class 'pyffi.formats.dds.HeaderFlags'>,
 <class 'pyffi.formats.dds.PixelFormatFlags'>,
 <class 'pyffi.formats.dds.Caps1'>,
 <class 'pyffi.formats.dds.Caps2'>]

xml_struct

Value:
[<class 'pyffi.formats.dds.PixelFormat'>,
 <class 'pyffi.formats.dds.Header'>]