Module txi

Module txi 

Source
Expand description

TXI ASCII texture-info support. TXI ASCII reader and writer.

TXI (texture info) resources are line-based text sidecars for texture resources. Each directive is a command followed by optional arguments.

§Format Layout

<command> <args...>
<command> <args...>
upperleftcoords <count>
  <u> <v> <w>
  ...
lowerrightcoords <count>
  <u> <v> <w>
  ...

Empty lines are ignored. Commands are treated case-insensitively for parse decisions. Policy-normalized mode normalizes command tokens in-memory; source-preserving mode keeps original command spelling. Text is decoded/encoded as Windows-1252.

Structs§

Txi
In-memory TXI container.
TxiCoordinate
One TXI UV coordinate entry.
TxiCoordinateBlock
One TXI coordinate block command.
TxiDirective
One TXI command with optional argument payload.
TxiReadOptions
Reader options for TXI parsing.
TxiWriteOptions
Writer options for TXI serialization.

Enums§

TxiEntry
One ordered TXI entry.
TxiError
Errors produced while parsing or serializing TXI text data.

Functions§

read_txi
Reads TXI data from a reader.
read_txi_from_bytes
Reads TXI data from bytes.
read_txi_from_bytes_with_options
Reads TXI data from bytes with explicit parse options.
read_txi_with_options
Reads TXI data from a reader with explicit parse options.
write_txi
Writes TXI data to a writer.
write_txi_to_vec
Serializes TXI data to bytes.
write_txi_to_vec_with_options
Serializes TXI data to bytes with explicit serialization options.
write_txi_with_options
Writes TXI data to a writer with explicit serialization options.