public override ChunkRaw CreateRawChunk() { var c = CreateEmptyChunk(32, true); PngHelperInternal.WriteInt4tobytes(PngHelperInternal.DoubleToInt100000(whitex), c.Data, 0); PngHelperInternal.WriteInt4tobytes(PngHelperInternal.DoubleToInt100000(whitey), c.Data, 4); PngHelperInternal.WriteInt4tobytes(PngHelperInternal.DoubleToInt100000(redx), c.Data, 8); PngHelperInternal.WriteInt4tobytes(PngHelperInternal.DoubleToInt100000(redy), c.Data, 12); PngHelperInternal.WriteInt4tobytes(PngHelperInternal.DoubleToInt100000(greenx), c.Data, 16); PngHelperInternal.WriteInt4tobytes(PngHelperInternal.DoubleToInt100000(greeny), c.Data, 20); PngHelperInternal.WriteInt4tobytes(PngHelperInternal.DoubleToInt100000(bluex), c.Data, 24); PngHelperInternal.WriteInt4tobytes(PngHelperInternal.DoubleToInt100000(bluey), c.Data, 28); return(c); }
public override ChunkRaw CreateRawChunk() { ChunkRaw chunkRaw = null; chunkRaw = createEmptyChunk(32, alloc: true); PngHelperInternal.WriteInt4tobytes(PngHelperInternal.DoubleToInt100000(whitex), chunkRaw.Data, 0); PngHelperInternal.WriteInt4tobytes(PngHelperInternal.DoubleToInt100000(whitey), chunkRaw.Data, 4); PngHelperInternal.WriteInt4tobytes(PngHelperInternal.DoubleToInt100000(redx), chunkRaw.Data, 8); PngHelperInternal.WriteInt4tobytes(PngHelperInternal.DoubleToInt100000(redy), chunkRaw.Data, 12); PngHelperInternal.WriteInt4tobytes(PngHelperInternal.DoubleToInt100000(greenx), chunkRaw.Data, 16); PngHelperInternal.WriteInt4tobytes(PngHelperInternal.DoubleToInt100000(greeny), chunkRaw.Data, 20); PngHelperInternal.WriteInt4tobytes(PngHelperInternal.DoubleToInt100000(bluex), chunkRaw.Data, 24); PngHelperInternal.WriteInt4tobytes(PngHelperInternal.DoubleToInt100000(bluey), chunkRaw.Data, 28); return(chunkRaw); }