Class PixelFormat

java.lang.Object
com.shinyhut.vernacular.protocol.messages.PixelFormat
All Implemented Interfaces:
Encodable

public class PixelFormat extends Object implements Encodable
  • Field Details

    • bitsPerPixel

      private final int bitsPerPixel
    • depth

      private final int depth
    • bigEndian

      private final boolean bigEndian
    • trueColor

      private final boolean trueColor
    • redMax

      private final int redMax
    • greenMax

      private final int greenMax
    • blueMax

      private final int blueMax
    • redShift

      private final int redShift
    • greenShift

      private final int greenShift
    • blueShift

      private final int blueShift
  • Constructor Details

    • PixelFormat

      public PixelFormat(int bitsPerPixel, int depth, boolean bigEndian, boolean trueColor, int redMax, int greenMax, int blueMax, int redShift, int greenShift, int blueShift)
  • Method Details

    • getBitsPerPixel

      public int getBitsPerPixel()
    • getBytesPerPixel

      public int getBytesPerPixel()
    • getDepth

      public int getDepth()
    • isBigEndian

      public boolean isBigEndian()
    • isTrueColor

      public boolean isTrueColor()
    • getRedMax

      public int getRedMax()
    • getGreenMax

      public int getGreenMax()
    • getBlueMax

      public int getBlueMax()
    • getRedShift

      public int getRedShift()
    • getGreenShift

      public int getGreenShift()
    • getBlueShift

      public int getBlueShift()
    • encode

      public void encode(OutputStream out) throws IOException
      Specified by:
      encode in interface Encodable
      Throws:
      IOException
    • decode

      public static PixelFormat decode(InputStream in) throws IOException
      Throws:
      IOException