public interface RGBAComponent extends Cloneable
Specifies an element of an array representing the order and size of the component values within a pixel value as part of an RGBA Layout. The RGB layout type type is a fixed-size 8 element array, where each element consists of an RGBA component value. Each RGBA component has with the following fields:
code - RGBA component kind enumerated value
specifying the component kind.size - Java byte specifying the number of bits.A fill component indicates unused bits. After the
components have been specified, the remaining code and size fields
should be set to RGBAComponentKind.None and 0 respectively.
To make values of this type, use the following methods from the MAJ forge:
Forge.makeRGBAComponent(RGBAComponentKind, byte);Forge.zeroRGBAComponent();
toString():
Forge.parseRGBAComponent(String).| Modifier and Type | Method and Description |
|---|---|
RGBAComponent |
clone()
Create a cloned copy of this RGBA component value.
|
RGBAComponentKind |
getCode()
Returns the type of an RGBA component.
|
byte |
getComponentSize()
Returns the size, measured in bits, of the RGBA component.
|
void |
setCode(RGBAComponentKind code)
Sets the type of an RGBA component.
|
void |
setComponentSize(byte size)
Sets the size, measured in bits, of the RGBA component.
|
String |
toString()
Formats a pseudo-XML string representation of this RGBA component value.
|
RGBAComponentKind getCode()
Returns the type of an RGBA component.
void setCode(RGBAComponentKind code) throws NullPointerException
Sets the type of an RGBA component.
code - Type of an RGBA component.NullPointerException - The given component kind is null.@UInt8 byte getComponentSize()
Returns the size, measured in bits, of the RGBA component.
void setComponentSize(@UInt8 byte size) throws IllegalArgumentException
Sets the size, measured in bits, of the RGBA component.
size - Size of the RGBA component.IllegalArgumentException - The size value is negative.RGBAComponent clone()
Create a cloned copy of this RGBA component value.
String toString()
Formats a pseudo-XML string representation of this RGBA component value. The representation
consists of a RGBAComponent element with Code and Size
sub-elements. For example, an 8-bit red component is represented as follows:
<RGBAComponent>
<Code>CompRed</Code>
<ComponentSize>8</ComponentSize>
</RGBAComponent>
This representation can be parsed by
Forge.parseRGBAComponent(String).
toString in class ObjectForge.parseRGBAComponent(String)(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.