Top Description Fields Constructors Methods
jogamp.opengl.util.pngj.chunks

public Class PngChunkTRNS

extends PngChunkSingle
Class Inheritance
Imports
jogamp.opengl.util.pngj.ImageInfo, .PngHelperInternal, .PngjException

tRNS chunk.

see http://www.w3.org/TR/PNG/#11tRNS

this chunk structure depends on the image type

Field Summary

Modifier and TypeField and Description
private int
private int
private int
public static final String
private int[]
private int

Constructor Summary

AccessConstructor and Description
public
PngChunkTRNS(final ImageInfo info)

Method Summary

Modifier and TypeMethod and Description
public void
cloneDataFromRead(final PngChunk other)

Implements abstract jogamp.opengl.util.pngj.chunks.PngChunk.cloneDataFromRead.

Makes a copy of the chunk.
public ChunkRaw
createRawChunk()

Implements abstract jogamp.opengl.util.pngj.chunks.PngChunk.createRawChunk.

Creates the physical chunk.
public int
public PngChunk.ChunkOrderingConstraint
public int[]
getPalletteAlpha()

Warning

non deep copy

public int[]
public void
parseFromRaw(final ChunkRaw c)

Implements abstract jogamp.opengl.util.pngj.chunks.PngChunk.parseFromRaw.

Parses raw chunk and fill inside data.
public void
setGray(final int g)

public void
setIndexEntryAsTransparent(final int palAlphaIndex)

to use when only one pallete index is set as totally transparent

public void
setPalletteAlpha(final int[] palAlpha)

Warning

non deep copy

public void
setRGB(final int r, final int g, final int b)

Set rgb values

Inherited from jogamp.opengl.util.pngj.chunks.PngChunkSingle:
allowsMultipleequalshashCode

Field Detail

blueback to summary
private int blue
grayback to summary
private int gray
greenback to summary
private int green
IDback to summary
public static final String ID
paletteAlphaback to summary
private int[] paletteAlpha
redback to summary
private int red

Constructor Detail

PngChunkTRNSback to summary
public PngChunkTRNS(final ImageInfo info)

Method Detail

cloneDataFromReadback to summary
public void cloneDataFromRead(final PngChunk other)

Implements abstract jogamp.opengl.util.pngj.chunks.PngChunk.cloneDataFromRead.

Doc from jogamp.opengl.util.pngj.chunks.PngChunk.cloneDataFromRead.

Makes a copy of the chunk.

This is used when copying chunks from a reader to a writer

It should normally be a deep copy, and after the cloning this.equals(other) should return true

Annotations
@Override
createRawChunkback to summary
public ChunkRaw createRawChunk()

Implements abstract jogamp.opengl.util.pngj.chunks.PngChunk.createRawChunk.

Doc from jogamp.opengl.util.pngj.chunks.PngChunk.createRawChunk.

Creates the physical chunk. This is used when writing (serialization). Each particular chunk class implements its own logic.

Returns:ChunkRaw

A newly allocated and filled raw chunk

Annotations
@Override
getGrayback to summary
public int getGray()
getOrderingConstraintback to summary
public PngChunk.ChunkOrderingConstraint getOrderingConstraint()

Implements abstract jogamp.opengl.util.pngj.chunks.PngChunk.getOrderingConstraint.

Doc from jogamp.opengl.util.pngj.chunks.PngChunk.getOrderingConstraint.

see ChunkOrderingConstraint

Annotations
@Override
getPalletteAlphaback to summary
public int[] getPalletteAlpha()

Warning

non deep copy

getRGBback to summary
public int[] getRGB()
parseFromRawback to summary
public void parseFromRaw(final ChunkRaw c)

Implements abstract jogamp.opengl.util.pngj.chunks.PngChunk.parseFromRaw.

Doc from jogamp.opengl.util.pngj.chunks.PngChunk.parseFromRaw.

Parses raw chunk and fill inside data. This is used when reading (deserialization). Each particular chunk class implements its own logic.

Annotations
@Override
setGrayback to summary
public void setGray(final int g)
setIndexEntryAsTransparentback to summary
public void setIndexEntryAsTransparent(final int palAlphaIndex)

to use when only one pallete index is set as totally transparent

setPalletteAlphaback to summary
public void setPalletteAlpha(final int[] palAlpha)

Warning

non deep copy

setRGBback to summary
public void setRGB(final int r, final int g, final int b)

Set rgb values