Class RawTileBlob
- Namespace
- LansMap.Map.TilePipeline.Decode
- Assembly
- LansMap.Runtime.dll
public static class RawTileBlob
- Inheritance
-
objectRawTileBlob
Fields
HeaderSize
public const int HeaderSize = 12
Field Value
Methods
TryParse(byte[], int, out int, out TextureFormat, out int, out int)
public static bool TryParse(byte[] blob, int blobLength, out int width, out TextureFormat format, out int dataOffset, out int dataLength)
Parameters
Returns
Wrap(byte[], int, int, TextureFormat)
public static byte[] Wrap(byte[] pixels, int length, int width, TextureFormat format)
Parameters
Returns
- byte[]
WrapInto(byte[], byte[], int, int, TextureFormat)
Writes the same header Wrap(byte[], int, int, TextureFormat) writes, plus the pixel data, into a caller-supplied buffer instead of allocating one.
public static int WrapInto(byte[] dest, byte[] pixels, int length, int width, TextureFormat format)
Parameters
destbyte[]Destination buffer; must be at least HeaderSize plus
lengthbytes long.pixelsbyte[]Source buffer; only the first
lengthbytes are copied.lengthintPixel data length in bytes.
widthintTexture width and height in pixels.
formatTextureFormatPixel format the data is stored in.
Returns
- int
The total number of bytes written: HeaderSize plus
length.