jfxrt

== 0) {
      paramInt5 = paramInt1 * paramPixelFormat.getBytesPerPixelUnit();
    }
    if (paramBuffer == null) {
      throw new IllegalArgumentException("Pixel buffer must be non-null");
    }
    if ((paramInt1 <= 0) || (paramInt2 <= 0)) {
      throw new IllegalArgumentException("Image dimensions must be > 0");
    }
    if ((paramInt3 < 0) || (paramInt4 < 0)) {
      throw new IllegalArgumentException("Image minX and minY must be >= 0");
    }
    if ((paramInt3 + paramInt1) * paramPixelFormat.getBytesPerPixelUnit() > paramInt5) {
      throw new IllegalArgumentException("Image scanlineStride is too small");
    }
    if (paramInt5 % paramPixelFormat.getBytesPerPixelUnit() != 0) {
      throw new IllegalArgumentException("Image scanlineStride must be a multiple of the pixel stride");
    }
    pixelFormat = paramPixelFormat;
    pixelBuffer = paramBuffer;
    width = paramInt1;
    height = paramInt2;
    minX = paramInt3;
    minY = paramInt4;
    scanlineStride = paramInt5;
    pixelScale = paramFloat;
  }
  
  public PixelFormat getPixelFormat()
  {
    return pixelFormat;
  }
  
  public PixelFormat.DataType getDataType()
  {
    return pixelFormat.getDataType();
  }
  
  public int getBytesPerPixelUnit()
  {
    return pixelFormat.getBytesPerPixelUnit();
  }
  
  public Buffer getPixelBuffer()
  {
    return pixelBuffer;
  }
  
  public int getMinX()
  {
    return minX;
  }
  
  public int getMinY()
  {
    return minY;
  }
  
  public int getWidth()
  {
    return width;
  }
  
  public int getHeight()
  {
    return height;
  }
  
  public int getScanlineStride()
  {
    return scanlineStride;
  }
  
  public float getPixelScale()
  {
    return pixelScale;
  }
  
  public int getRowLength()
  {
    return scanlineStride / pixelFormat.getBytesPerPixelUnit();
  }
  
  public boolean isTightlyPacked()
  {
    return (minX == 0) && (minY == 0) && (width == getRowLength());
  }
  
  public Image createSubImage(int paramInt1, int paramInt2, int paramInt3, int paramInt4)
  {
    if ((paramInt3 <= 0) || (paramInt4 <= 0)) {
      throw new IllegalArgumentException("Subimage dimensions must be > 0");
    }
    if ((paramInt1 < 0) || (paramInt2 < 0)) {
      throw new IllegalArgumentException("Subimage minX and minY must be >= 0");
    }
    if (paramInt1 + paramInt3 > width) {
      throw new IllegalArgumentException("Subimage minX+width must be <= width of parent image");
    }
    if (paramInt2 + paramInt4 > height) {
      throw new IllegalArgumentException("Subimage minY+height must be <= height of parent image");
    }
    Image localImage = new Image(pixelFormat, pixelBuffer, paramInt3, paramInt4, minX + paramInt1, minY + paramInt2, scanlineStride);
    serial = serial;
    return localImage;
  }
  
  public Image createPackedCopy()
  {
    int i = width * pixelFormat.getBytesPerPixelUnit();
    Buffer localBuffer = createPackedBuffer(pixelBuffer, pixelFormat, minX, minY, width, height, scanlineStride);
    return new Image(pixelFormat, localBuffer, width, height, 0, 0, i);
  }
  
  public Image createPackedCopyIfNeeded()
  {
    int i = width * pixelFormat.getBytesPerPixelUnit();
    if ((i == scanlineStride) && (minX == 0) && (minY == 0)) {
      return this;
    }
    return createPackedCopy();
  }
  
  public static Buffer createPackedBuffer(Buffer paramBuffer, PixelFormat paramPixelFormat, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5)
  {
    if (paramInt5 % paramPixelFormat.getBytesPerPixelUnit() != 0) {
      throw new IllegalArgumentException("Image scanlineStride must be a multiple of the pixel stride");
    }
    if (paramPixelFormat == PixelFormat.MULTI_YCbCr_420) {
      throw new IllegalArgumentException("Format unsupported " + paramPixelFormat);
    }
    int i = paramPixelFormat.getElemsPerPixelUnit();
    int j = paramInt5 / paramPixelFormat.getBytesPerPixelUnit();
    int k = j * i;
    int m = paramInt3 * i;
    int n = m * paramInt4;
    int i1 = paramInt1 * i + paramInt2 * k;
    int i2 = 0;
    Object localObject;
    switch (paramPixelFormat.getDataType())
    {
    case BYTE: 
      ByteBuffer localByteBuffer1 = (ByteBuffer)paramBuffer;
      ByteBuffer localByteBuffer2 = BufferUtil.newByteBuffer(n);
      for (int i3 = 0; i3 < paramInt4; i3++)
      {
        localByteBuffer1.limit(i1 + m);
        localByteBuffer1.position(i1);
        localByteBuffer2.limit(i2 + m);
        localByteBuffer2.position(i2);
        localByteBuffer2.put(localByteBuffer1);
        i1 += k;
        i2 += m;
      }
      localObject = localByteBuffer2;
      break;
    case INT: 
      IntBuffer localIntBuffer1 = (IntBuffer)paramBuffer;
      IntBuffer localIntBuffer2 = BufferUtil.newIntBuffer(n);
      for (int i4 = 0; i4 < paramInt4; i4++)
      {
        localIntBuffer1.limit(i1 + m);
        localIntBuffer1.position(i1);
        localIntBuffer2.limit(i2 + m);
        localIntBuffer2.position(i2);
        localIntBuffer2.put(localIntBuffer1);
        i1 += k;
        i2 += m;
      }
      localObject = localIntBuffer2;
      break;
    case FLOAT: 
      FloatBuffer localFloatBuffer1 = (FloatBuffer)paramBuffer;
      FloatBuffer localFloatBuffer2 = BufferUtil.newFloatBuffer(n);
      for (int i5 = 0; i5 < paramInt4; i5++)
      {
        localFloatBuffer1.limit(i1 + m);
        localFloatBuffer1.position(i1);
        localFloatBuffer2.limit(i2 + m);
        localFloatBuffer2.position(i2);
        localFloatBuffer2.put(localFloatBuffer1);
        i1 += k;
        i2 += m;
      }
      localObject = localFloatBuffer2;
      break;
    default: 
      throw new InternalError("Unknown data type");
    }
    paramBuffer.limit(paramBuffer.capacity());
    paramBuffer.rewind();
    ((Buffer)localObject).limit(((Buffer)localObject).capacity());
    ((Buffer)localObject).rewind();
    return (Buffer)localObject;
  }
  
  public Image iconify(ByteBuffer paramByteBuffer, int paramInt1, int paramInt2)
  {
    if (pixelFormat == PixelFormat.MULTI_YCbCr_420) {
      throw new IllegalArgumentException("Format not supported " + pixelFormat);
    }
    int i = getBytesPerPixelUnit();
    int j = paramInt1 * i;
    ByteToIntPixelConverter localByteToIntPixelConverter;
    if (i == 1) {
      localByteToIntPixelConverter = ByteGray.ToIntArgbPreConverter;
    } else if (pixelFormat == PixelFormat.BYTE_BGRA_PRE) {
      localByteToIntPixelConverter = ByteBgraPre.ToIntArgbPreConverter;
    } else {
      localByteToIntPixelConverter = ByteRgb.ToIntArgbPreConverter;
    }
    int[] arrayOfInt = new int[paramInt1 * paramInt2];
    localByteToIntPixelConverter.convert(paramByteBuffer, 0, j, arrayOfInt, 0, paramInt1, paramInt1, paramInt2);
    return new Image(PixelFormat.INT_ARGB_PRE, arrayOfInt, paramInt1, paramInt2);
  }
  
  public String toString()
  {
    return super.toString() + " [format=" + pixelFormat + " width=" + width + " height=" + height + " scanlineStride=" + scanlineStride + " minX=" + minX + " minY=" + minY + " pixelBuffer=" + pixelBuffer + " bpp=" + getBytesPerPixelUnit() + "]";
  }
  
  public int getSerial()
  {
    return serial[0];
  }
  
  public Image promoteByteRgbToByteBgra()
  {
    ByteBuffer localByteBuffer1 = (ByteBuffer)pixelBuffer;
    ByteBuffer localByteBuffer2 = ByteBuffer.allocate(width * height * 4);
    int i = minY * scanlineStride + minX * 3;
    ByteRgb.ToByteBgraPreConverter.convert(localByteBuffer1, i, scanlineStride, localByteBuffer2, 0, width * 4, width, height);
    return new Image(PixelFormat.BYTE_BGRA_PRE, localByteBuffer2, width, height, 0, 0, width * 4, getPixelScale());
  }
  
  private Accessor getPixelAccessor()
  {
    if (pixelaccessor == null) {
      switch (getPixelFormat())
      {
      case BYTE_ALPHA: 
      case BYTE_APPLE_422: 
      case FLOAT_XYZW: 
      case MULTI_YCbCr_420: 
      default: 
        pixelaccessor = new UnsupportedAccess(null);
        break;
      case BYTE_GRAY: 
        pixelaccessor = new ByteAccess(getGrayFXPixelFormat(), ByteGray.getter, null, (ByteBuffer)pixelBuffer, 1);
        break;
      case BYTE_RGB: 
        pixelaccessor = new ByteRgbAccess((ByteBuffer)pixelBuffer);
        break;
      case BYTE_BGRA_PRE: 
        pixelaccessor = new ByteAccess(FX_ByteBgraPre_FORMAT, (ByteBuffer)pixelBuffer, 4);
        break;
      case INT_ARGB_PRE: 
        pixelaccessor = new IntAccess(FX_IntArgbPre_FORMAT, (IntBuffer)pixelBuffer);
      }
    }
    if ((pixelaccessor != null) && (pixelScale != 1.0F)) {
      pixelaccessor = new ScaledAccessor(pixelaccessor, pixelScale);
    }
    return pixelaccessor;
  }
  
  public javafx.scene.image.PixelFormat getPlatformPixelFormat()
  {
    return getPixelAccessor().getPlatformPixelFormat();
  }
  
  public boolean isWritable()
  {
    return getPixelAccessor().isWritable();
  }
  
  public PlatformImage promoteToWritableImage()
  {
    return getPixelAccessor().promoteToWritableImage();
  }
  
  public int getArgb(int paramInt1, int paramInt2)
  {
    return getPixelAccessor().getArgb(paramInt1, paramInt2);
  }
  
  public void setArgb(int paramInt1, int paramInt2, int paramInt3)
  {
    getPixelAccessor().setArgb(paramInt1, paramInt2, paramInt3);
    serial[0] += 1;
  }
  
  public <T extends Buffer> void getPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, WritablePixelFormat<T> paramWritablePixelFormat, T paramT, int paramInt5)
  {
    getPixelAccessor().getPixels(paramInt1, paramInt2, paramInt3, paramInt4, paramWritablePixelFormat, paramT, paramInt5);
  }
  
  public void getPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, WritablePixelFormat<ByteBuffer> paramWritablePixelFormat, byte[] paramArrayOfByte, int paramInt5, int paramInt6)
  {
    getPixelAccessor().getPixels(paramInt1, paramInt2, paramInt3, paramInt4, paramWritablePixelFormat, paramArrayOfByte, paramInt5, paramInt6);
  }
  
  public void getPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, WritablePixelFormat<IntBuffer> paramWritablePixelFormat, int[] paramArrayOfInt, int paramInt5, int paramInt6)
  {
    getPixelAccessor().getPixels(paramInt1, paramInt2, paramInt3, paramInt4, paramWritablePixelFormat, paramArrayOfInt, paramInt5, paramInt6);
  }
  
  public <T extends Buffer> void setPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, javafx.scene.image.PixelFormat<T> paramPixelFormat, T paramT, int paramInt5)
  {
    getPixelAccessor().setPixels(paramInt1, paramInt2, paramInt3, paramInt4, paramPixelFormat, paramT, paramInt5);
    serial[0] += 1;
  }
  
  public void setPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, javafx.scene.image.PixelFormat<ByteBuffer> paramPixelFormat, byte[] paramArrayOfByte, int paramInt5, int paramInt6)
  {
    getPixelAccessor().setPixels(paramInt1, paramInt2, paramInt3, paramInt4, paramPixelFormat, paramArrayOfByte, paramInt5, paramInt6);
    serial[0] += 1;
  }
  
  public void setPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, javafx.scene.image.PixelFormat<IntBuffer> paramPixelFormat, int[] paramArrayOfInt, int paramInt5, int paramInt6)
  {
    getPixelAccessor().setPixels(paramInt1, paramInt2, paramInt3, paramInt4, paramPixelFormat, paramArrayOfInt, paramInt5, paramInt6);
    serial[0] += 1;
  }
  
  public void setPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, PixelReader paramPixelReader, int paramInt5, int paramInt6)
  {
    getPixelAccessor().setPixels(paramInt1, paramInt2, paramInt3, paramInt4, paramPixelReader, paramInt5, paramInt6);
    serial[0] += 1;
  }
  
  static <I extends Buffer> PixelSetter<I> getSetterIfWritable(javafx.scene.image.PixelFormat<I> paramPixelFormat)
  {
    if ((paramPixelFormat instanceof WritablePixelFormat)) {
      return PixelUtils.getSetter((WritablePixelFormat)paramPixelFormat);
    }
    return null;
  }
  
  static javafx.scene.image.PixelFormat getGrayFXPixelFormat()
  {
    if (FX_ByteGray_FORMAT == null)
    {
      int[] arrayOfInt = new int['?'];
      int i = -16777216;
      for (int j = 0; j < 256; j++)
      {
        arrayOfInt[j] = i;
        i += 65793;
      }
      FX_ByteGray_FORMAT = javafx.scene.image.PixelFormat.createByteIndexedPremultipliedInstance(arrayOfInt);
    }
    return FX_ByteGray_FORMAT;
  }
  
  abstract class Accessor<I extends Buffer>
  {
    Accessor() {}
    
    public abstract int getArgb(int paramInt1, int paramInt2);
    
    public abstract void setArgb(int paramInt1, int paramInt2, int paramInt3);
    
    public abstract javafx.scene.image.PixelFormat getPlatformPixelFormat();
    
    public abstract boolean isWritable();
    
    public abstract PlatformImage promoteToWritableImage();
    
    public abstract <T extends Buffer> void getPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, WritablePixelFormat<T> paramWritablePixelFormat, T paramT, int paramInt5);
    
    public abstract void getPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, WritablePixelFormat<ByteBuffer> paramWritablePixelFormat, byte[] paramArrayOfByte, int paramInt5, int paramInt6);
    
    public abstract void getPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, WritablePixelFormat<IntBuffer> paramWritablePixelFormat, int[] paramArrayOfInt, int paramInt5, int paramInt6);
    
    public abstract <T extends Buffer> void setPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, javafx.scene.image.PixelFormat<T> paramPixelFormat, T paramT, int paramInt5);
    
    public abstract void setPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, javafx.scene.image.PixelFormat<ByteBuffer> paramPixelFormat, byte[] paramArrayOfByte, int paramInt5, int paramInt6);
    
    public abstract void setPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, javafx.scene.image.PixelFormat<IntBuffer> paramPixelFormat, int[] paramArrayOfInt, int paramInt5, int paramInt6);
    
    public abstract void setPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, PixelReader paramPixelReader, int paramInt5, int paramInt6);
  }
  
  abstract class BaseAccessor<I extends Buffer>
    extends Image.Accessor<I>
  {
    javafx.scene.image.PixelFormat<I> theFormat;
    PixelGetter<I> theGetter;
    PixelSetter<I> theSetter;
    I theBuffer;
    int pixelElems;
    int scanlineElems;
    int offsetElems;
    
    BaseAccessor(I paramI, int paramInt)
    {
      this(paramI, PixelUtils.getGetter(paramI), Image.getSetterIfWritable(paramI), paramInt, i);
    }
    
    BaseAccessor(PixelGetter<I> paramPixelGetter, PixelSetter<I> paramPixelSetter, I paramI, int paramInt)
    {
      super();
      theFormat = paramPixelGetter;
      theGetter = paramPixelSetter;
      theSetter = paramI;
      theBuffer = paramInt;
      int i;
      pixelElems = i;
      scanlineElems = (scanlineStride / pixelFormat.getDataType().getSizeInBytes());
      offsetElems = (minY * scanlineElems + minX * i);
    }
    
    public int getIndex(int paramInt1, int paramInt2)
    {
      if ((paramInt1 < 0) || (paramInt2 < 0) || (paramInt1 >= width) || (paramInt2 >= height)) {
        throw new IndexOutOfBoundsException(paramInt1 + ", " + paramInt2);
      }
      return offsetElems + paramInt2 * scanlineElems + paramInt1 * pixelElems;
    }
    
    public I getBuffer()
    {
      return theBuffer;
    }
    
    public PixelGetter<I> getGetter()
    {
      if (theGetter == null) {
        throw new UnsupportedOperationException("Unsupported Image type");
      }
      return theGetter;
    }
    
    public PixelSetter<I> getSetter()
    {
      if (theSetter == null) {
        throw new UnsupportedOperationException("Unsupported Image type");
      }
      return theSetter;
    }
    
    public javafx.scene.image.PixelFormat getPlatformPixelFormat()
    {
      return theFormat;
    }
    
    public boolean isWritable()
    {
      return theSetter != null;
    }
    
    public PlatformImage promoteToWritableImage()
    {
      return Image.this;
    }
    
    public int getArgb(int paramInt1, int paramInt2)
    {
      return getGetter().getArgb(getBuffer(), getIndex(paramInt1, paramInt2));
    }
    
    public void setArgb(int paramInt1, int paramInt2, int paramInt3)
    {
      getSetter().setArgb(getBuffer(), getIndex(paramInt1, paramInt2), paramInt3);
    }
    
    public <T extends Buffer> void getPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, WritablePixelFormat<T> paramWritablePixelFormat, T paramT, int paramInt5)
    {
      PixelSetter localPixelSetter = PixelUtils.getSetter(paramWritablePixelFormat);
      PixelConverter localPixelConverter = PixelUtils.getConverter(getGetter(), localPixelSetter);
      int i = paramT.position();
      localPixelConverter.convert(getBuffer(), getIndex(paramInt1, paramInt2), scanlineElems, paramT, i, paramInt5, paramInt3, paramInt4);
    }
    
    public <T extends Buffer> void setPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, javafx.scene.image.PixelFormat<T> paramPixelFormat, T paramT, int paramInt5)
    {
      PixelGetter localPixelGetter = PixelUtils.getGetter(paramPixelFormat);
      PixelConverter localPixelConverter = PixelUtils.getConverter(localPixelGetter, getSetter());
      int i = paramT.position();
      localPixelConverter.convert(paramT, i, paramInt5, getBuffer(), getIndex(paramInt1, paramInt2), scanlineElems, paramInt3, paramInt4);
    }
  }
  
  class ByteAccess
    extends Image.BaseAccessor<ByteBuffer>
  {
    ByteAccess(PixelGetter<ByteBuffer> paramPixelGetter, PixelSetter<ByteBuffer> paramPixelSetter, ByteBuffer paramByteBuffer, int paramInt)
    {
      super(paramPixelGetter, paramPixelSetter, paramByteBuffer, paramInt, i);
    }
    
    ByteAccess(ByteBuffer paramByteBuffer, int paramInt)
    {
      super(paramByteBuffer, paramInt, i);
    }
    
    public void getPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, WritablePixelFormat<ByteBuffer> paramWritablePixelFormat, byte[] paramArrayOfByte, int paramInt5, int paramInt6)
    {
      BytePixelSetter localBytePixelSetter = PixelUtils.getByteSetter(paramWritablePixelFormat);
      ByteToBytePixelConverter localByteToBytePixelConverter = PixelUtils.getB2BConverter(getGetter(), localBytePixelSetter);
      localByteToBytePixelConverter.convert((ByteBuffer)getBuffer(), getIndex(paramInt1, paramInt2), scanlineElems, paramArrayOfByte, paramInt5, paramInt6, paramInt3, paramInt4);
    }
    
    public void getPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, WritablePixelFormat<IntBuffer> paramWritablePixelFormat, int[] paramArrayOfInt, int paramInt5, int paramInt6)
    {
      IntPixelSetter localIntPixelSetter = PixelUtils.getIntSetter(paramWritablePixelFormat);
      ByteToIntPixelConverter localByteToIntPixelConverter = PixelUtils.getB2IConverter(getGetter(), localIntPixelSetter);
      localByteToIntPixelConverter.convert((ByteBuffer)getBuffer(), getIndex(paramInt1, paramInt2), scanlineElems, paramArrayOfInt, paramInt5, paramInt6, paramInt3, paramInt4);
    }
    
    public void setPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, javafx.scene.image.PixelFormat<ByteBuffer> paramPixelFormat, byte[] paramArrayOfByte, int paramInt5, int paramInt6)
    {
      BytePixelGetter localBytePixelGetter = PixelUtils.getByteGetter(paramPixelFormat);
      ByteToBytePixelConverter localByteToBytePixelConverter = PixelUtils.getB2BConverter(localBytePixelGetter, getSetter());
      localByteToBytePixelConverter.convert(paramArrayOfByte, paramInt5, paramInt6, (ByteBuffer)getBuffer(), getIndex(paramInt1, paramInt2), scanlineElems, paramInt3, paramInt4);
    }
    
    public void setPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, javafx.scene.image.PixelFormat<IntBuffer> paramPixelFormat, int[] paramArrayOfInt, int paramInt5, int paramInt6)
    {
      IntPixelGetter localIntPixelGetter = PixelUtils.getIntGetter(paramPixelFormat);
      IntToBytePixelConverter localIntToBytePixelConverter = PixelUtils.getI2BConverter(localIntPixelGetter, getSetter());
      localIntToBytePixelConverter.convert(paramArrayOfInt, paramInt5, paramInt6, (ByteBuffer)getBuffer(), getIndex(paramInt1, paramInt2), scanlineElems, paramInt3, paramInt4);
    }
    
    public void setPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, PixelReader paramPixelReader, int paramInt5, int paramInt6)
    {
      ByteBuffer localByteBuffer = ((ByteBuffer)theBuffer).duplicate();
      localByteBuffer.position(localByteBuffer.position() + getIndex(paramInt1, paramInt2));
      paramPixelReader.getPixels(paramInt5, paramInt6, paramInt3, paramInt4, (WritablePixelFormat)theFormat, localByteBuffer, scanlineElems);
    }
  }
  
  class ByteRgbAccess
    extends Image.ByteAccess
  {
    public ByteRgbAccess(ByteBuffer paramByteBuffer)
    {
      super(Image.FX_ByteRgb_FORMAT, paramByteBuffer, 3);
    }
    
    public PlatformImage promoteToWritableImage()
    {
      return promoteByteRgbToByteBgra();
    }
  }
  
  class IntAccess
    extends Image.BaseAccessor<IntBuffer>
  {
    IntAccess(IntBuffer paramIntBuffer)
    {
      super(paramIntBuffer, localBuffer, 1);
    }
    
    public void getPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, WritablePixelFormat<ByteBuffer> paramWritablePixelFormat, byte[] paramArrayOfByte, int paramInt5, int paramInt6)
    {
      BytePixelSetter localBytePixelSetter = PixelUtils.getByteSetter(paramWritablePixelFormat);
      IntToBytePixelConverter localIntToBytePixelConverter = PixelUtils.getI2BConverter(getGetter(), localBytePixelSetter);
      localIntToBytePixelConverter.convert((IntBuffer)getBuffer(), getIndex(paramInt1, paramInt2), scanlineElems, paramArrayOfByte, paramInt5, paramInt6, paramInt3, paramInt4);
    }
    
    public void getPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, WritablePixelFormat<IntBuffer> paramWritablePixelFormat, int[] paramArrayOfInt, int paramInt5, int paramInt6)
    {
      IntPixelSetter localIntPixelSetter = PixelUtils.getIntSetter(paramWritablePixelFormat);
      IntToIntPixelConverter localIntToIntPixelConverter = PixelUtils.getI2IConverter(getGetter(), localIntPixelSetter);
      localIntToIntPixelConverter.convert((IntBuffer)getBuffer(), getIndex(paramInt1, paramInt2), scanlineElems, paramArrayOfInt, paramInt5, paramInt6, paramInt3, paramInt4);
    }
    
    public void setPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, javafx.scene.image.PixelFormat<ByteBuffer> paramPixelFormat, byte[] paramArrayOfByte, int paramInt5, int paramInt6)
    {
      BytePixelGetter localBytePixelGetter = PixelUtils.getByteGetter(paramPixelFormat);
      ByteToIntPixelConverter localByteToIntPixelConverter = PixelUtils.getB2IConverter(localBytePixelGetter, getSetter());
      localByteToIntPixelConverter.convert(paramArrayOfByte, paramInt5, paramInt6, (IntBuffer)getBuffer(), getIndex(paramInt1, paramInt2), scanlineElems, paramInt3, paramInt4);
    }
    
    public void setPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, javafx.scene.image.PixelFormat<IntBuffer> paramPixelFormat, int[] paramArrayOfInt, int paramInt5, int paramInt6)
    {
      IntPixelGetter localIntPixelGetter = PixelUtils.getIntGetter(paramPixelFormat);
      IntToIntPixelConverter localIntToIntPixelConverter = PixelUtils.getI2IConverter(localIntPixelGetter, getSetter());
      localIntToIntPixelConverter.convert(paramArrayOfInt, paramInt5, paramInt6, (IntBuffer)getBuffer(), getIndex(paramInt1, paramInt2), scanlineElems, paramInt3, paramInt4);
    }
    
    public void setPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, PixelReader paramPixelReader, int paramInt5, int paramInt6)
    {
      IntBuffer localIntBuffer = ((IntBuffer)theBuffer).duplicate();
      localIntBuffer.position(localIntBuffer.position() + getIndex(paramInt1, paramInt2));
      paramPixelReader.getPixels(paramInt5, paramInt6, paramInt3, paramInt4, (WritablePixelFormat)theFormat, localIntBuffer, scanlineElems);
    }
  }
  
  class ScaledAccessor<I extends Buffer>
    extends Image.Accessor<I>
  {
    Image.Accessor<I> theDelegate;
    float pixelScale;
    
    ScaledAccessor(float paramFloat)
    {
      super();
      theDelegate = paramFloat;
      Object localObject;
      pixelScale = localObject;
    }
    
    private int scale(int paramInt)
    {
      return (int)((paramInt + 0.5F) * pixelScale);
    }
    
    public int getArgb(int paramInt1, int paramInt2)
    {
      return theDelegate.getArgb(scale(paramInt1), scale(paramInt2));
    }
    
    public void setArgb(int paramInt1, int paramInt2, int paramInt3)
    {
      throw new UnsupportedOperationException("Pixel setting for scaled images not supported yet");
    }
    
    public javafx.scene.image.PixelFormat getPlatformPixelFormat()
    {
      return theDelegate.getPlatformPixelFormat();
    }
    
    public boolean isWritable()
    {
      return theDelegate.isWritable();
    }
    
    public PlatformImage promoteToWritableImage()
    {
      throw new UnsupportedOperationException("Pixel setting for scaled images not supported yet");
    }
    
    public <T extends Buffer> void getPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, WritablePixelFormat<T> paramWritablePixelFormat, T paramT, int paramInt5)
    {
      PixelSetter localPixelSetter = PixelUtils.getSetter(paramWritablePixelFormat);
      int i = paramT.position();
      int j = localPixelSetter.getNumElements();
      for (int k = 0; k < paramInt4; k++)
      {
        int m = scale(paramInt2 + k);
        int n = i;
        for (int i1 = 0; i1 < paramInt3; i1++)
        {
          int i2 = scale(paramInt1 + i1);
          localPixelSetter.setArgb(paramT, n, theDelegate.getArgb(i2, m));
          n += j;
        }
        i += paramInt5;
      }
    }
    
    public void getPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, WritablePixelFormat<ByteBuffer> paramWritablePixelFormat, byte[] paramArrayOfByte, int paramInt5, int paramInt6)
    {
      ByteBuffer localByteBuffer = ByteBuffer.wrap(paramArrayOfByte);
      localByteBuffer.position(paramInt5);
      getPixels(paramInt1, paramInt2, paramInt3, paramInt4, paramWritablePixelFormat, localByteBuffer, paramInt6);
    }
    
    public void getPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, WritablePixelFormat<IntBuffer> paramWritablePixelFormat, int[] paramArrayOfInt, int paramInt5, int paramInt6)
    {
      IntBuffer localIntBuffer = IntBuffer.wrap(paramArrayOfInt);
      localIntBuffer.position(paramInt5);
      getPixels(paramInt1, paramInt2, paramInt3, paramInt4, paramWritablePixelFormat, localIntBuffer, paramInt6);
    }
    
    public <T extends Buffer> void setPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, javafx.scene.image.PixelFormat<T> paramPixelFormat, T paramT, int paramInt5)
    {
      throw new UnsupportedOperationException("Pixel setting for scaled images not supported yet");
    }
    
    public void setPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, javafx.scene.image.PixelFormat<ByteBuffer> paramPixelFormat, byte[] paramArrayOfByte, int paramInt5, int paramInt6)
    {
      throw new UnsupportedOperationException("Pixel setting for scaled images not supported yet");
    }
    
    public void setPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, javafx.scene.image.PixelFormat<IntBuffer> paramPixelFormat, int[] paramArrayOfInt, int paramInt5, int paramInt6)
    {
      throw new UnsupportedOperationException("Pixel setting for scaled images not supported yet");
    }
    
    public void setPixels(int paramInt1, int paramInt2, int paramInt3, int paramInt4, PixelReader paramPixelReader, int paramInt5, int paramInt6)
    {
      throw new UnsupportedOperationException("Pixel setting for scaled images not supported yet");
    }
  }
  
  class UnsupportedAccess
    extends Image.ByteAccess
  {
    private UnsupportedAccess()
    {
      super(null, null, null, null, 0);
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.prism.Image
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.prism;

public abstract interface MaskTextureGraphics
  extends Graphics
{
  public abstract void drawPixelsMasked(RTTexture paramRTTexture1, RTTexture paramRTTexture2, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8);
  
  public abstract void maskInterpolatePixels(RTTexture paramRTTexture1, RTTexture paramRTTexture2, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8);
}

/* Location:
 * Qualified Name:     com.sun.prism.MaskTextureGraphics
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.prism;

import java.nio.ByteBuffer;

public abstract interface MediaFrame
{
  public abstract ByteBuffer getBuffer();
  
  public abstract PixelFormat getPixelFormat();
  
  public abstract int getWidth();
  
  public abstract int getHeight();
  
  public abstract int getEncodedWidth();
  
  public abstract int getEncodedHeight();
  
  public abstract int planeCount();
  
  public abstract int[] planeOffsets();
  
  public abstract int offsetForPlane(int paramInt);
  
  public abstract int[] planeStrides();
  
  public abstract int strideForPlane(int paramInt);
  
  public abstract MediaFrame convertToFormat(PixelFormat paramPixelFormat);
  
  public abstract void holdFrame();
  
  public abstract void releaseFrame();
}

/* Location:
 * Qualified Name:     com.sun.prism.MediaFrame
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.prism;

import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Iterator;

public final class MultiTexture
  implements Texture
{
  private int width;
  private int height;
  private PixelFormat format;
  private Texture.WrapMode wrapMode = Texture.WrapMode.CLAMP_TO_EDGE;
  private boolean linearFiltering = true;
  private final ArrayList<Texture> textures;
  private int lastImageSerial;
  
  public MultiTexture(PixelFormat paramPixelFormat, int paramInt1, int paramInt2)
  {
    width = paramInt1;
    height = paramInt2;
    format = paramPixelFormat;
    textures = new ArrayList(4);
  }
  
  public int textureCount()
  {
    return textures.size();
  }
  
  public void setTexture(Texture paramTexture, int paramInt)
  {
    if (textures.size() < paramInt + 1)
    {
      for (int i = textures.size(); i < paramInt; i++) {
        textures.add(null);
      }
      textures.add(paramTexture);
    }
    else
    {
      textures.set(paramInt, paramTexture);
    }
    paramTexture.setWrapMode(wrapMode);
    paramTexture.setLinearFiltering(linearFiltering);
  }
  
  public Texture getTexture(int paramInt)
  {
    return (Texture)textures.get(paramInt);
  }
  
  public Texture[] getTextures()
  {
    return (Texture[])textures.toArray(new Texture[textures.size()]);
  }
  
  public void removeTexture(Texture paramTexture)
  {
    textures.remove(paramTexture);
  }
  
  public void removeTexture(int paramInt)
  {
    textures.remove(paramInt);
  }
  
  public PixelFormat getPixelFormat()
  {
    return format;
  }
  
  public int getPhysicalWidth()
  {
    return width;
  }
  
  public int getPhysicalHeight()
  {
    return height;
  }
  
  public int getContentX()
  {
    return 0;
  }
  
  public int getContentY()
  {
    return 0;
  }
  
  public int getContentWidth()
  {
    return width;
  }
  
  public int getContentHeight()
  {
    return height;
  }
  
  public long getNativeSourceHandle()
  {
    return 0L;
  }
  
  public int getLastImageSerial()
  {
    return lastImageSerial;
  }
  
  public void setLastImageSerial(int paramInt)
  {
    lastImageSerial = paramInt;
  }
  
  public void update(Image paramImage)
  {
    throw new UnsupportedOperationException("Update from Image not supported");
  }
  
  public void update(Image paramImage, int paramInt1, int paramInt2)
  {
    throw new UnsupportedOperationException("Update from Image not supported");
  }
  
  public void update(Image paramImage, int paramInt1, int paramInt2, int paramInt3, int paramInt4)
  {
    throw new UnsupportedOperationException("Update from Image not supported");
  }
  
  public void update(Image paramImage, int paramInt1, int paramInt2, int paramInt3, int paramInt4, boolean paramBoolean)
  {
    throw new UnsupportedOperationException("Update from Image not supported");
  }
  
  public void update(Buffer paramBuffer, PixelFormat paramPixelFormat, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, boolean paramBoolean)
  {
    throw new UnsupportedOperationException("Update from generic Buffer not supported");
  }
  
  public void update(MediaFrame paramMediaFrame, boolean paramBoolean)
  {
    if (paramMediaFrame.getPixelFormat() == PixelFormat.MULTI_YCbCr_420)
    {
      ByteBuffer localByteBuffer = paramMediaFrame.getBuffer();
      int i = paramMediaFrame.getEncodedWidth();
      int j = paramMediaFrame.getEncodedHeight();
      for (int k = 0; k < paramMediaFrame.planeCount(); k++)
      {
        Texture localTexture = (Texture)textures.get(k);
        if (null != localTexture)
        {
          int m = i;
          int n = j;
          if ((k == 2) || (k == 1))
          {
            m /= 2;
            n /= 2;
          }
          localByteBuffer.position(paramMediaFrame.offsetForPlane(k));
          localTexture.update(localByteBuffer.slice(), PixelFormat.BYTE_ALPHA, 0, 0, 0, 0, m, n, paramMediaFrame.strideForPlane(k), paramBoolean);
        }
      }
    }
    else
    {
      throw new IllegalArgumentException("Invalid pixel format in MediaFrame");
    }
  }
  
  public Texture.WrapMode getWrapMode()
  {
    return wrapMode;
  }
  
  public void setWrapMode(Texture.WrapMode paramWrapMode)
  {
    wrapMode = paramWrapMode;
    Iterator localIterator = textures.iterator();
    while (localIterator.hasNext())
    {
      Texture localTexture = (Texture)localIterator.next();
      localTexture.setWrapMode(paramWrapMode);
    }
  }
  
  public boolean getLinearFiltering()
  {
    return linearFiltering;
  }
  
  public void setLinearFiltering(boolean paramBoolean)
  {
    linearFiltering = paramBoolean;
    Iterator localIterator = textures.iterator();
    while (localIterator.hasNext())
    {
      Texture localTexture = (Texture)localIterator.next();
      localTexture.setLinearFiltering(paramBoolean);
    }
  }
  
  public void dispose()
  {
    Iterator localIterator = textures.iterator();
    while (localIterator.hasNext())
    {
      Texture localTexture = (Texture)localIterator.next();
      localTexture.dispose();
    }
    textures.clear();
  }
}

/* Location:
 * Qualified Name:     com.sun.prism.MultiTexture
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.prism;

public enum PixelFormat$DataType
{
  BYTE(1),  INT(4),  FLOAT(4);
  
  private int sizeInBytes;
  
  private PixelFormat$DataType(int paramInt)
  {
    sizeInBytes = paramInt;
  }
  
  public int getSizeInBytes()
  {
    return sizeInBytes;
  }
}

/* Location:
 * Qualified Name:     com.sun.prism.PixelFormat.DataType
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.prism;

public enum PixelFormat
{
  INT_ARGB_PRE(DataType.INT, 1, true, false),  BYTE_BGRA_PRE(DataType.BYTE, 4, true, false),  BYTE_RGB(DataType.BYTE, 3, true, true),  BYTE_GRAY(DataType.BYTE, 1, true, true),  BYTE_ALPHA(DataType.BYTE, 1, false, false),  MULTI_YCbCr_420(DataType.BYTE, 1, false, true),  BYTE_APPLE_422(DataType.BYTE, 2, false, true),  FLOAT_XYZW(DataType.FLOAT, 4, false, true);
  
  public static final int YCBCR_PLANE_LUMA = 0;
  public static final int YCBCR_PLANE_CHROMARED = 1;
  public static final int YCBCR_PLANE_CHROMABLUE = 2;
  public static final int YCBCR_PLANE_ALPHA = 3;
  private DataType dataType;
  private int elemsPerPixelUnit;
  private boolean rgb;
  private boolean opaque;
  
  private PixelFormat(DataType paramDataType, int paramInt, boolean paramBoolean1, boolean paramBoolean2)
  {
    dataType = paramDataType;
    elemsPerPixelUnit = paramInt;
    rgb = paramBoolean1;
    opaque = paramBoolean2;
  }
  
  public DataType getDataType()
  {
    return dataType;
  }
  
  public int getBytesPerPixelUnit()
  {
    return elemsPerPixelUnit * dataType.getSizeInBytes();
  }
  
  public int getElemsPerPixelUnit()
  {
    return elemsPerPixelUnit;
  }
  
  public boolean isRGB()
  {
    return rgb;
  }
  
  public boolean isOpaque()
  {
    return opaque;
  }
  
  public static enum DataType
  {
    BYTE(1),  INT(4),  FLOAT(4);
    
    private int sizeInBytes;
    
    private DataType(int paramInt)
    {
      sizeInBytes = paramInt;
    }
    
    public int getSizeInBytes()
    {
      return sizeInBytes;
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.prism.PixelFormat
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.prism;

import com.sun.javafx.geom.Rectangle;

public abstract interface Presentable
  extends RenderTarget
{
  public abstract boolean prepare(Rectangle paramRectangle);
  
  public abstract boolean present();
  
  public abstract boolean recreateOnResize();
  
  public abstract float getPixelScaleFactor();
}

/* Location:
 * Qualified Name:     com.sun.prism.Presentable
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.prism;

import java.nio.Buffer;

public abstract interface RTTexture
  extends Texture, RenderTarget
{
  public abstract int[] getPixels();
  
  public abstract boolean readPixels(Buffer paramBuffer);
  
  public abstract boolean isVolatile();
}

/* Location:
 * Qualified Name:     com.sun.prism.RTTexture
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.prism;

import com.sun.javafx.geom.Rectangle;

public abstract interface ReadbackGraphics
  extends Graphics
{
  public abstract boolean canReadBack();
  
  public abstract RTTexture readBack(Rectangle paramRectangle);
  
  public abstract void releaseReadBackBuffer(RTTexture paramRTTexture);
}

/* Location:
 * Qualified Name:     com.sun.prism.ReadbackGraphics
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.prism;

public abstract interface ReadbackRenderTarget
  extends RenderTarget
{
  public abstract Texture getBackBuffer();
}

/* Location:
 * Qualified Name:     com.sun.prism.ReadbackRenderTarget
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.prism;

public abstract interface RectShadowGraphics
  extends Graphics
{}

/* Location:
 * Qualified Name:     com.sun.prism.RectShadowGraphics
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.prism;

import com.sun.glass.ui.Screen;

public abstract interface RenderTarget
  extends Surface
{
  public abstract long getNativeDestHandle();
  
  public abstract Screen getAssociatedScreen();
  
  public abstract Graphics createGraphics();
  
  public abstract boolean isOpaque();
  
  public abstract void setOpaque(boolean paramBoolean);
}

/* Location:
 * Qualified Name:     com.sun.prism.RenderTarget
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.prism;

public abstract interface RenderingContext
{
  public abstract void begin();
  
  public abstract void end();
}

/* Location:
 * Qualified Name:     com.sun.prism.RenderingContext
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.prism;

import com.sun.glass.ui.View;
import com.sun.prism.impl.VertexBuffer;
import com.sun.prism.shape.ShapeRep;

public abstract interface ResourceFactory
  extends Grap
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd