com.io7m.jcanephora.cursors

## Class JCGLRGBA8UByteBuffered

- java.lang.Object
- - com.io7m.jcanephora.cursors.JCGLRGBA8UByteBuffered

- All Implemented Interfaces:
    JCGLRGBA8UReadableType, JCGLRGBA8UType, JCGLRGBA8UWritableType, com.io7m.jpra.runtime.java.JPRAValueType

      public final class JCGLRGBA8UByteBuffered
      extends Object
      implements JCGLRGBA8UType

  A `ByteBuffer` based implementation of the `JCGLRGBA8U` packed type.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getA()`
    `int` | `getB()`
    `int` | `getG()`
    `int` | `getR()`
    `static JCGLRGBA8UType` | `newValue(ByteBuffer in_buffer, com.io7m.jpra.runtime.java.JPRACursorByteReadableType in_pointer)` Construct a view of a type.
    `static JCGLRGBA8UType` | `newValueWithOffset(ByteBuffer in_buffer, com.io7m.jpra.runtime.java.JPRACursorByteReadableType in_pointer, int in_base_offset)` Construct a view of a type.
    `void` | `set(int r, int g, int b, int a)` Set the value of all fields.
    `void` | `setA(int x)` Set the value of the `a` field.
    `void` | `setB(int x)` Set the value of the `b` field.
    `void` | `setG(int x)` Set the value of the `g` field.
    `void` | `setR(int x)` Set the value of the `r` field.
    `int` | `sizeOctets()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### newValueWithOffset

          public static JCGLRGBA8UType newValueWithOffset(ByteBuffer in_buffer,
                                                          com.io7m.jpra.runtime.java.JPRACursorByteReadableType in_pointer,
                                                          int in_base_offset)

      Construct a view of a type.
      Parameters:
        `in_buffer` - A byte buffer
        `in_pointer` - A cursor
        `in_base_offset` - The base offset from the cursor
      Returns:
        A view of a type

    - #### newValue

          public static JCGLRGBA8UType newValue(ByteBuffer in_buffer,
                                                com.io7m.jpra.runtime.java.JPRACursorByteReadableType in_pointer)

      Construct a view of a type.
      Parameters:
        `in_buffer` - A byte buffer
        `in_pointer` - A cursor
      Returns:
        A view of a type

    - #### sizeOctets

          public int sizeOctets()

      Specified by:
        `sizeOctets` in interface `com.io7m.jpra.runtime.java.JPRAValueType`

    - #### getR

          public int getR()

      Specified by:
        `getR` in interface `JCGLRGBA8UReadableType`
      Returns:
        The value of the `r` field

    - #### setR

          public void setR(int x)

      Description copied from interface: `JCGLRGBA8UWritableType`
      Set the value of the `r` field. The 8 least significant bits of `x` will be used.
      Specified by:
        `setR` in interface `JCGLRGBA8UWritableType`
      Parameters:
        `x` - The new value

    - #### getG

          public int getG()

      Specified by:
        `getG` in interface `JCGLRGBA8UReadableType`
      Returns:
        The value of the `g` field

    - #### setG

          public void setG(int x)

      Description copied from interface: `JCGLRGBA8UWritableType`
      Set the value of the `g` field. The 8 least significant bits of `x` will be used.
      Specified by:
        `setG` in interface `JCGLRGBA8UWritableType`
      Parameters:
        `x` - The new value

    - #### getB

          public int getB()

      Specified by:
        `getB` in interface `JCGLRGBA8UReadableType`
      Returns:
        The value of the `b` field

    - #### setB

          public void setB(int x)

      Description copied from interface: `JCGLRGBA8UWritableType`
      Set the value of the `b` field. The 8 least significant bits of `x` will be used.
      Specified by:
        `setB` in interface `JCGLRGBA8UWritableType`
      Parameters:
        `x` - The new value

    - #### getA

          public int getA()

      Specified by:
        `getA` in interface `JCGLRGBA8UReadableType`
      Returns:
        The value of the `a` field

    - #### setA

          public void setA(int x)

      Description copied from interface: `JCGLRGBA8UWritableType`
      Set the value of the `a` field. The 8 least significant bits of `x` will be used.
      Specified by:
        `setA` in interface `JCGLRGBA8UWritableType`
      Parameters:
        `x` - The new value

    - #### set

          public void set(int r,
                          int g,
                          int b,
                          int a)

      Description copied from interface: `JCGLRGBA8UWritableType`
      Set the value of all fields.
      Specified by:
        `set` in interface `JCGLRGBA8UWritableType`
      Parameters:
        `r` - The value for field `r`
        `g` - The value for field `g`
        `b` - The value for field `b`
        `a` - The value for field `a`

Copyright © 2016 <code@io7m.com> http://io7m.com