Table of Contents

Class RawTileBlob

Namespace
LansMap.Map.TilePipeline.Decode
Assembly
LansMap.Runtime.dll
public static class RawTileBlob
Inheritance
object
RawTileBlob

Fields

HeaderSize

public const int HeaderSize = 12

Field Value

int

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

blob byte[]
blobLength int
width int
format TextureFormat
dataOffset int
dataLength int

Returns

bool

Wrap(byte[], int, int, TextureFormat)

public static byte[] Wrap(byte[] pixels, int length, int width, TextureFormat format)

Parameters

pixels byte[]
length int
width int
format TextureFormat

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

dest byte[]

Destination buffer; must be at least HeaderSize plus length bytes long.

pixels byte[]

Source buffer; only the first length bytes are copied.

length int

Pixel data length in bytes.

width int

Texture width and height in pixels.

format TextureFormat

Pixel format the data is stored in.

Returns

int

The total number of bytes written: HeaderSize plus length.