com.io7m.jcanephora.cursors

## Class JCGLRGBA8ByteBuffered

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

- All Implemented Interfaces:
    JCGLRGBA8ReadableType, JCGLRGBA8Type, JCGLRGBA8WritableType, com.io7m.jpra.runtime.java.JPRAValueType

      public final class JCGLRGBA8ByteBuffered
      extends Object
      implements JCGLRGBA8Type

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

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `getA()`
    `int` | `getARaw()`
    `double` | `getB()`
    `int` | `getBRaw()`
    `double` | `getG()`
    `int` | `getGRaw()`
    `double` | `getR()`
    `int` | `getRRaw()`
    `static JCGLRGBA8Type` | `newValue(ByteBuffer in_buffer, com.io7m.jpra.runtime.java.JPRACursorByteReadableType in_pointer)` Construct a view of a type.
    `static JCGLRGBA8Type` | `newValueWithOffset(ByteBuffer in_buffer, com.io7m.jpra.runtime.java.JPRACursorByteReadableType in_pointer, int in_base_offset)` Construct a view of a type.
    `void` | `set(double r, double g, double b, double a)` Set the value of all fields.
    `void` | `setA(double x)` Set the value of the `a` field.
    `void` | `setARaw(int x)` Set the value of the `a` field.
    `void` | `setB(double x)` Set the value of the `b` field.
    `void` | `setBRaw(int x)` Set the value of the `b` field.
    `void` | `setG(double x)` Set the value of the `g` field.
    `void` | `setGRaw(int x)` Set the value of the `g` field.
    `void` | `setR(double x)` Set the value of the `r` field.
    `void` | `setRRaw(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 JCGLRGBA8Type 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 JCGLRGBA8Type 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`

    - #### getRRaw

          public int getRRaw()

      Specified by:
        `getRRaw` in interface `JCGLRGBA8ReadableType`
      Returns:
        The value of the `r` field

    - #### setRRaw

          public void setRRaw(int x)

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

    - #### getR

          public double getR()

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

    - #### setR

          public void setR(double x)

      Description copied from interface: `JCGLRGBA8WritableType`
      Set the value of the `r` field.
      Specified by:
        `setR` in interface `JCGLRGBA8WritableType`
      Parameters:
        `x` - The new value (in the range `[0, 1]`)

    - #### getGRaw

          public int getGRaw()

      Specified by:
        `getGRaw` in interface `JCGLRGBA8ReadableType`
      Returns:
        The value of the `g` field

    - #### setGRaw

          public void setGRaw(int x)

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

    - #### getG

          public double getG()

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

    - #### setG

          public void setG(double x)

      Description copied from interface: `JCGLRGBA8WritableType`
      Set the value of the `g` field.
      Specified by:
        `setG` in interface `JCGLRGBA8WritableType`
      Parameters:
        `x` - The new value (in the range `[0, 1]`)

    - #### getBRaw

          public int getBRaw()

      Specified by:
        `getBRaw` in interface `JCGLRGBA8ReadableType`
      Returns:
        The value of the `b` field

    - #### setBRaw

          public void setBRaw(int x)

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

    - #### getB

          public double getB()

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

    - #### setB

          public void setB(double x)

      Description copied from interface: `JCGLRGBA8WritableType`
      Set the value of the `b` field.
      Specified by:
        `setB` in interface `JCGLRGBA8WritableType`
      Parameters:
        `x` - The new value (in the range `[0, 1]`)

    - #### getARaw

          public int getARaw()

      Specified by:
        `getARaw` in interface `JCGLRGBA8ReadableType`
      Returns:
        The value of the `a` field

    - #### setARaw

          public void setARaw(int x)

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

    - #### getA

          public double getA()

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

    - #### setA

          public void setA(double x)

      Description copied from interface: `JCGLRGBA8WritableType`
      Set the value of the `a` field.
      Specified by:
        `setA` in interface `JCGLRGBA8WritableType`
      Parameters:
        `x` - The new value (in the range `[0, 1]`)

    - #### set

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

      Description copied from interface: `JCGLRGBA8WritableType`
      Set the value of all fields.
      Specified by:
        `set` in interface `JCGLRGBA8WritableType`
      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