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.
§Shape of the file
One directive per line, a command token followed by its arguments. No
header, no terminator, no required order. The only structure beyond a flat
list is upperleftcoords and lowerrightcoords, which declare a count and
are followed by that many coordinate triples.
Empty lines are ignored and command matching is case-insensitive. Two write modes exist because both are legitimate: policy-normalised regularises command spelling, source-preserving keeps whatever the input used so someone else’s file round-trips without being editorialised.
Text is decoded and encoded as Windows-1252. The grammar and the engine’s
parse behaviour, including how unrecognised directives and malformed boolean
arguments fail silently, are in docs/src/formats/textures/txi.md.
Structs§
- Txi
- In-memory TXI container.
- TxiCoordinate
- One TXI UV coordinate entry.
- TxiCoordinate
Block - One TXI coordinate block command.
- TxiDirective
- One TXI command with optional argument payload.
- TxiRead
Options - Reader options for TXI parsing.
- TxiWrite
Options - Writer options for TXI serialization.
Enums§
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.