jfxrt

form, RenderingHints paramRenderingHints, float[] paramArrayOfFloat, Color[] paramArrayOfColor, MultipleGradientPaint.CycleMethod paramCycleMethod, MultipleGradientPaint.ColorSpaceType paramColorSpaceType)
  {
    if (paramRectangle == null) {
      throw new NullPointerException("Device bounds cannot be null");
    }
    if (paramRectangle2D == null) {
      throw new NullPointerException("User bounds cannot be null");
    }
    if (paramAffineTransform == null) {
      throw new NullPointerException("Transform cannot be null");
    }
    AffineTransform localAffineTransform;
    try
    {
      localAffineTransform = paramAffineTransform.createInverse();
    }
    catch (NoninvertibleTransformException localNoninvertibleTransformException)
    {
      localAffineTransform = new AffineTransform();
    }
    double[] arrayOfDouble = new double[6];
    localAffineTransform.getMatrix(arrayOfDouble);
    a00 = ((float)arrayOfDouble[0]);
    a10 = ((float)arrayOfDouble[1]);
    a01 = ((float)arrayOfDouble[2]);
    a11 = ((float)arrayOfDouble[3]);
    a02 = ((float)arrayOfDouble[4]);
    a12 = ((float)arrayOfDouble[5]);
    cycleMethod = paramCycleMethod;
    colorSpace = paramColorSpaceType;
    fractions = paramArrayOfFloat;
    gradient = (gradient != null ? (int[])gradient.get() : null);
    gradients = (gradients != null ? (int[][])gradients.get() : (int[][])null);
    if ((gradient == null) && (gradients == null))
    {
      calculateLookupData(paramArrayOfColor);
      model = model;
      normalizedIntervals = normalizedIntervals;
      isSimpleLookup = isSimpleLookup;
      if (isSimpleLookup)
      {
        fastGradientArraySize = fastGradientArraySize;
        gradient = new SoftReference(gradient);
      }
      else
      {
        gradients = new SoftReference(gradients);
      }
    }
    else
    {
      model = model;
      normalizedIntervals = normalizedIntervals;
      isSimpleLookup = isSimpleLookup;
      fastGradientArraySize = fastGradientArraySize;
    }
  }
  
  private void calculateLookupData(Color[] paramArrayOfColor)
  {
    Color[] arrayOfColor;
    if (colorSpace == MultipleGradientPaint.ColorSpaceType.LINEAR_RGB)
    {
      arrayOfColor = new Color[paramArrayOfColor.length];
      for (i = 0; i < paramArrayOfColor.length; i++)
      {
        j = paramArrayOfColor[i].getRGB();
        k = j >>> 24;
        int m = SRGBtoLinearRGB[(j >> 16 & 0xFF)];
        int n = SRGBtoLinearRGB[(j >> 8 & 0xFF)];
        int i1 = SRGBtoLinearRGB[(j & 0xFF)];
        arrayOfColor[i] = new Color(m, n, i1, k);
      }
    }
    else
    {
      arrayOfColor = paramArrayOfColor;
    }
    normalizedIntervals = new float[fractions.length - 1];
    for (int i = 0; i < normalizedIntervals.length; i++) {
      normalizedIntervals[i] = (fractions[(i + 1)] - fractions[i]);
    }
    transparencyTest = -16777216;
    gradients = new int[normalizedIntervals.length][];
    float f = 1.0F;
    for (int j = 0; j < normalizedIntervals.length; j++) {
      f = f > normalizedIntervals[j] ? normalizedIntervals[j] : f;
    }
    j = 0;
    for (int k = 0; k < normalizedIntervals.length; k++) {
      j = (int)(j + normalizedIntervals[k] / f * 256.0F);
    }
    if (j > 5000) {
      calculateMultipleArrayGradient(arrayOfColor);
    } else {
      calculateSingleArrayGradient(arrayOfColor, f);
    }
    if (transparencyTest >>> 24 == 255) {
      model = xrgbmodel;
    } else {
      model = ColorModel.getRGBdefault();
    }
  }
  
  private void calculateSingleArrayGradient(Color[] paramArrayOfColor, float paramFloat)
  {
    isSimpleLookup = true;
    int k = 1;
    for (int m = 0; m < gradients.length; m++)
    {
      n = (int)(normalizedIntervals[m] / paramFloat * 255.0F);
      k += n;
      gradients[m] = new int[n];
      int i = paramArrayOfColor[m].getRGB();
      int j = paramArrayOfColor[(m + 1)].getRGB();
      interpolate(i, j, gradients[m]);
      transparencyTest &= i;
      transparencyTest &= j;
    }
    gradient = new int[k];
    m = 0;
    for (int n = 0; n < gradients.length; n++)
    {
      System.arraycopy(gradients[n], 0, gradient, m, gradients[n].length);
      m += gradients[n].length;
    }
    gradient[(gradient.length - 1)] = paramArrayOfColor[(paramArrayOfColor.length - 1)].getRGB();
    if (colorSpace == MultipleGradientPaint.ColorSpaceType.LINEAR_RGB) {
      for (n = 0; n < gradient.length; n++) {
        gradient[n] = convertEntireColorLinearRGBtoSRGB(gradient[n]);
      }
    }
    fastGradientArraySize = (gradient.length - 1);
  }
  
  private void calculateMultipleArrayGradient(Color[] paramArrayOfColor)
  {
    isSimpleLookup = false;
    for (int k = 0; k < gradients.length; k++)
    {
      gradients[k] = new int['?'];
      int i = paramArrayOfColor[k].getRGB();
      int j = paramArrayOfColor[(k + 1)].getRGB();
      interpolate(i, j, gradients[k]);
      transparencyTest &= i;
      transparencyTest &= j;
    }
    if (colorSpace == MultipleGradientPaint.ColorSpaceType.LINEAR_RGB) {
      for (k = 0; k < gradients.length; k++) {
        for (int m = 0; m < gradients[k].length; m++) {
          gradients[k][m] = convertEntireColorLinearRGBtoSRGB(gradients[k][m]);
        }
      }
    }
  }
  
  private void interpolate(int paramInt1, int paramInt2, int[] paramArrayOfInt)
  {
    float f = 1.0F / paramArrayOfInt.length;
    int i = paramInt1 >> 24 & 0xFF;
    int j = paramInt1 >> 16 & 0xFF;
    int k = paramInt1 >> 8 & 0xFF;
    int m = paramInt1 & 0xFF;
    int n = (paramInt2 >> 24 & 0xFF) - i;
    int i1 = (paramInt2 >> 16 & 0xFF) - j;
    int i2 = (paramInt2 >> 8 & 0xFF) - k;
    int i3 = (paramInt2 & 0xFF) - m;
    for (int i4 = 0; i4 < paramArrayOfInt.length; i4++) {
      paramArrayOfInt[i4] = ((int)(i + i4 * n * f + 0.5D) << 24 | (int)(j + i4 * i1 * f + 0.5D) << 16 | (int)(k + i4 * i2 * f + 0.5D) << 8 | (int)(m + i4 * i3 * f + 0.5D));
    }
  }
  
  private int convertEntireColorLinearRGBtoSRGB(int paramInt)
  {
    int i = paramInt >> 24 & 0xFF;
    int j = paramInt >> 16 & 0xFF;
    int k = paramInt >> 8 & 0xFF;
    int m = paramInt & 0xFF;
    j = LinearRGBtoSRGB[j];
    k = LinearRGBtoSRGB[k];
    m = LinearRGBtoSRGB[m];
    return i << 24 | j << 16 | k << 8 | m;
  }
  
  protected final int indexIntoGradientsArrays(float paramFloat)
  {
    if (cycleMethod == MultipleGradientPaint.CycleMethod.NO_CYCLE)
    {
      if (paramFloat > 1.0F) {
        paramFloat = 1.0F;
      } else if (paramFloat < 0.0F) {
        paramFloat = 0.0F;
      }
    }
    else if (cycleMethod == MultipleGradientPaint.CycleMethod.REPEAT)
    {
      paramFloat -= (int)paramFloat;
      if (paramFloat < 0.0F) {
        paramFloat += 1.0F;
      }
    }
    else
    {
      if (paramFloat < 0.0F) {
        paramFloat = -paramFloat;
      }
      i = (int)paramFloat;
      paramFloat -= i;
      if ((i & 0x1) == 1) {
        paramFloat = 1.0F - paramFloat;
      }
    }
    if (isSimpleLookup) {
      return gradient[((int)(paramFloat * fastGradientArraySize))];
    }
    for (int i = 0; i < gradients.length; i++) {
      if (paramFloat < fractions[(i + 1)])
      {
        float f = paramFloat - fractions[i];
        int j = (int)(f / normalizedIntervals[i] * 255.0F);
        return gradients[i][j];
      }
    }
    return gradients[(gradients.length - 1)]['�'];
  }
  
  private static int convertSRGBtoLinearRGB(int paramInt)
  {
    float f1 = paramInt / 255.0F;
    float f2;
    if (f1 <= 0.04045F) {
      f2 = f1 / 12.92F;
    } else {
      f2 = (float)Math.pow((f1 + 0.055D) / 1.055D, 2.4D);
    }
    return Math.round(f2 * 255.0F);
  }
  
  private static int convertLinearRGBtoSRGB(int paramInt)
  {
    float f1 = paramInt / 255.0F;
    float f2;
    if (f1 <= 0.0031308D) {
      f2 = f1 * 12.92F;
    } else {
      f2 = 1.055F * (float)Math.pow(f1, 0.4166666666666667D) - 0.055F;
    }
    return Math.round(f2 * 255.0F);
  }
  
  public final Raster getRaster(int paramInt1, int paramInt2, int paramInt3, int paramInt4)
  {
    Raster localRaster = saved;
    if ((localRaster == null) || (localRaster.getWidth() < paramInt3) || (localRaster.getHeight() < paramInt4))
    {
      localRaster = getCachedRaster(model, paramInt3, paramInt4);
      saved = localRaster;
    }
    DataBufferInt localDataBufferInt = (DataBufferInt)localRaster.getDataBuffer();
    int[] arrayOfInt = localDataBufferInt.getData(0);
    int i = localDataBufferInt.getOffset();
    int j = ((SinglePixelPackedSampleModel)localRaster.getSampleModel()).getScanlineStride();
    int k = j - paramInt3;
    fillRaster(arrayOfInt, i, k, paramInt1, paramInt2, paramInt3, paramInt4);
    return localRaster;
  }
  
  protected abstract void fillRaster(int[] paramArrayOfInt, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6);
  
  private static synchronized Raster getCachedRaster(ColorModel paramColorModel, int paramInt1, int paramInt2)
  {
    if ((paramColorModel == cachedModel) && (cached != null))
    {
      Raster localRaster = (Raster)cached.get();
      if ((localRaster != null) && (localRaster.getWidth() >= paramInt1) && (localRaster.getHeight() >= paramInt2))
      {
        cached = null;
        return localRaster;
      }
    }
    return paramColorModel.createCompatibleWritableRaster(paramInt1, paramInt2);
  }
  
  private static synchronized void putCachedRaster(ColorModel paramColorModel, Raster paramRaster)
  {
    if (cached != null)
    {
      Raster localRaster = (Raster)cached.get();
      if (localRaster != null)
      {
        int i = localRaster.getWidth();
        int j = localRaster.getHeight();
        int k = paramRaster.getWidth();
        int m = paramRaster.getHeight();
        if ((i >= k) && (j >= m)) {
          return;
        }
        if (i * j >= k * m) {
          return;
        }
      }
    }
    cachedModel = paramColorModel;
    cached = new WeakReference(paramRaster);
  }
  
  public final void dispose()
  {
    if (saved != null)
    {
      putCachedRaster(model, saved);
      saved = null;
    }
  }
  
  public final ColorModel getColorModel()
  {
    return model;
  }
  
  static
  {
    for (int i = 0; i < 256; i++)
    {
      SRGBtoLinearRGB[i] = convertSRGBtoLinearRGB(i);
      LinearRGBtoSRGB[i] = convertLinearRGBtoSRGB(i);
    }
  }
}

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

import java.awt.Color;
import java.awt.PaintContext;
import java.awt.Rectangle;
import java.awt.RenderingHints;
import java.awt.geom.AffineTransform;
import java.awt.geom.Point2D;
import java.awt.geom.Point2D.Double;
import java.awt.geom.Point2D.Float;
import java.awt.geom.Rectangle2D;
import java.awt.image.ColorModel;

public final class RadialGradientPaint
  extends MultipleGradientPaint
{
  private final Point2D focus;
  private final Point2D center;
  private final float radius;
  
  public RadialGradientPaint(float paramFloat1, float paramFloat2, float paramFloat3, float[] paramArrayOfFloat, Color[] paramArrayOfColor)
  {
    this(paramFloat1, paramFloat2, paramFloat3, paramFloat1, paramFloat2, paramArrayOfFloat, paramArrayOfColor, MultipleGradientPaint.CycleMethod.NO_CYCLE);
  }
  
  public RadialGradientPaint(Point2D paramPoint2D, float paramFloat, float[] paramArrayOfFloat, Color[] paramArrayOfColor)
  {
    this(paramPoint2D, paramFloat, paramPoint2D, paramArrayOfFloat, paramArrayOfColor, MultipleGradientPaint.CycleMethod.NO_CYCLE);
  }
  
  public RadialGradientPaint(float paramFloat1, float paramFloat2, float paramFloat3, float[] paramArrayOfFloat, Color[] paramArrayOfColor, MultipleGradientPaint.CycleMethod paramCycleMethod)
  {
    this(paramFloat1, paramFloat2, paramFloat3, paramFloat1, paramFloat2, paramArrayOfFloat, paramArrayOfColor, paramCycleMethod);
  }
  
  public RadialGradientPaint(Point2D paramPoint2D, float paramFloat, float[] paramArrayOfFloat, Color[] paramArrayOfColor, MultipleGradientPaint.CycleMethod paramCycleMethod)
  {
    this(paramPoint2D, paramFloat, paramPoint2D, paramArrayOfFloat, paramArrayOfColor, paramCycleMethod);
  }
  
  public RadialGradientPaint(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float[] paramArrayOfFloat, Color[] paramArrayOfColor, MultipleGradientPaint.CycleMethod paramCycleMethod)
  {
    this(new Point2D.Float(paramFloat1, paramFloat2), paramFloat3, new Point2D.Float(paramFloat4, paramFloat5), paramArrayOfFloat, paramArrayOfColor, paramCycleMethod);
  }
  
  public RadialGradientPaint(Point2D paramPoint2D1, float paramFloat, Point2D paramPoint2D2, float[] paramArrayOfFloat, Color[] paramArrayOfColor, MultipleGradientPaint.CycleMethod paramCycleMethod)
  {
    this(paramPoint2D1, paramFloat, paramPoint2D2, paramArrayOfFloat, paramArrayOfColor, paramCycleMethod, MultipleGradientPaint.ColorSpaceType.SRGB, new AffineTransform());
  }
  
  public RadialGradientPaint(Point2D paramPoint2D1, float paramFloat, Point2D paramPoint2D2, float[] paramArrayOfFloat, Color[] paramArrayOfColor, MultipleGradientPaint.CycleMethod paramCycleMethod, MultipleGradientPaint.ColorSpaceType paramColorSpaceType, AffineTransform paramAffineTransform)
  {
    super(paramArrayOfFloat, paramArrayOfColor, paramCycleMethod, paramColorSpaceType, paramAffineTransform);
    if (paramPoint2D1 == null) {
      throw new NullPointerException("Center point must be non-null");
    }
    if (paramPoint2D2 == null) {
      throw new NullPointerException("Focus point must be non-null");
    }
    if (paramFloat < 0.0F) {
      throw new IllegalArgumentException("Radius must be non-negative");
    }
    center = new Point2D.Double(paramPoint2D1.getX(), paramPoint2D1.getY());
    focus = new Point2D.Double(paramPoint2D2.getX(), paramPoint2D2.getY());
    radius = paramFloat;
  }
  
  public RadialGradientPaint(Rectangle2D paramRectangle2D, float[] paramArrayOfFloat, Color[] paramArrayOfColor, MultipleGradientPaint.CycleMethod paramCycleMethod)
  {
    this(new Point2D.Double(paramRectangle2D.getCenterX(), paramRectangle2D.getCenterY()), 1.0F, new Point2D.Double(paramRectangle2D.getCenterX(), paramRectangle2D.getCenterY()), paramArrayOfFloat, paramArrayOfColor, paramCycleMethod, MultipleGradientPaint.ColorSpaceType.SRGB, createGradientTransform(paramRectangle2D));
    if (paramRectangle2D.isEmpty()) {
      throw new IllegalArgumentException("Gradient bounds must be non-empty");
    }
  }
  
  private static AffineTransform createGradientTransform(Rectangle2D paramRectangle2D)
  {
    double d1 = paramRectangle2D.getCenterX();
    double d2 = paramRectangle2D.getCenterY();
    AffineTransform localAffineTransform = AffineTransform.getTranslateInstance(d1, d2);
    localAffineTransform.scale(paramRectangle2D.getWidth() / 2.0D, paramRectangle2D.getHeight() / 2.0D);
    localAffineTransform.translate(-d1, -d2);
    return localAffineTransform;
  }
  
  public PaintContext createContext(ColorModel paramColorModel, Rectangle paramRectangle, Rectangle2D paramRectangle2D, AffineTransform paramAffineTransform, RenderingHints paramRenderingHints)
  {
    paramAffineTransform = new AffineTransform(paramAffineTransform);
    paramAffineTransform.concatenate(gradientTransform);
    return new RadialGradientPaintContext(this, paramColorModel, paramRectangle, paramRectangle2D, paramAffineTransform, paramRenderingHints, (float)center.getX(), (float)center.getY(), radius, (float)focus.getX(), (float)focus.getY(), fractions, colors, cycleMethod, colorSpace);
  }
  
  public Point2D getCenterPoint()
  {
    return new Point2D.Double(center.getX(), center.getY());
  }
  
  public Point2D getFocusPoint()
  {
    return new Point2D.Double(focus.getX(), focus.getY());
  }
  
  public float getRadius()
  {
    return radius;
  }
}

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

import java.awt.Color;
import java.awt.Rectangle;
import java.awt.RenderingHints;
import java.awt.geom.AffineTransform;
import java.awt.geom.Rectangle2D;
import java.awt.image.ColorModel;

final class RadialGradientPaintContext
  extends MultipleGradientPaintContext
{
  private boolean isSimpleFocus = false;
  private boolean isNonCyclic = false;
  private float radius;
  private float centerX;
  private float centerY;
  private float focusX;
  private float focusY;
  private float radiusSq;
  private float constA;
  private float constB;
  private float gDeltaDelta;
  private float trivial;
  private static final float SCALEBACK = 0.99F;
  private static final int SQRT_LUT_SIZE = 2048;
  private static float[] sqrtLut = new float['?'];
  
  RadialGradientPaintContext(RadialGradientPaint paramRadialGradientPaint, ColorModel paramColorModel, Rectangle paramRectangle, Rectangle2D paramRectangle2D, AffineTransform paramAffineTransform, RenderingHints paramRenderingHints, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float[] paramArrayOfFloat, Color[] paramArrayOfColor, MultipleGradientPaint.CycleMethod paramCycleMethod, MultipleGradientPaint.ColorSpaceType paramColorSpaceType)
  {
    super(paramRadialGradientPaint, paramColorModel, paramRectangle, paramRectangle2D, paramAffineTransform, paramRenderingHints, paramArrayOfFloat, paramArrayOfColor, paramCycleMethod, paramColorSpaceType);
    centerX = paramFloat1;
    centerY = paramFloat2;
    focusX = paramFloat4;
    focusY = paramFloat5;
    radius = paramFloat3;
    isSimpleFocus = ((focusX == centerX) && (focusY == centerY));
    isNonCyclic = (paramCycleMethod == MultipleGradientPaint.CycleMethod.NO_CYCLE);
    radiusSq = (radius * radius);
    float f1 = focusX - centerX;
    float f2 = focusY - centerY;
    double d = f1 * f1 + f2 * f2;
    if (d > radiusSq * 0.99F)
    {
      float f3 = (float)Math.sqrt(radiusSq * 0.99F / d);
      f1 *= f3;
      f2 *= f3;
      focusX = (centerX + f1);
      focusY = (centerY + f2);
    }
    trivial = ((float)Math.sqrt(radiusSq - f1 * f1));
    constA = (a02 - centerX);
    constB = (a12 - centerY);
    gDeltaDelta = (2.0F * (a00 * a00 + a10 * a10) / radiusSq);
  }
  
  protected void fillRaster(int[] paramArrayOfInt, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6)
  {
    if ((isSimpleFocus) && (isNonCyclic) && (isSimpleLookup)) {
      simpleNonCyclicFillRaster(paramArrayOfInt, paramInt1, paramInt2, paramInt3, paramInt4, paramInt5, paramInt6);
    } else {
      cyclicCircularGradientFillRaster(paramArrayOfInt, paramInt1, paramInt2, paramInt3, paramInt4, paramInt5, paramInt6);
    }
  }
  
  private void simpleNonCyclicFillRaster(int[] paramArrayOfInt, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6)
  {
    float f1 = a00 * paramInt3 + a01 * paramInt4 + constA;
    float f2 = a10 * paramInt3 + a11 * paramInt4 + constB;
    float f3 = gDeltaDelta;
    paramInt2 += paramInt5;
    int i = gradient[fastGradientArraySize];
    for (int j = 0; j < paramInt6; j++)
    {
      float f4 = (f1 * f1 + f2 * f2) / radiusSq;
      float f5 = 2.0F * (a00 * f1 + a10 * f2) / radiusSq + f3 / 2.0F;
      for (int k = 0; (k < paramInt5) && (f4 >= 1.0F); k++)
      {
        paramArrayOfInt[(paramInt1 + k)] = i;
        f4 += f5;
        f5 += f3;
      }
      while ((k < paramInt5) && (f4 < 1.0F))
      {
        int m;
        if (f4 <= 0.0F)
        {
          m = 0;
        }
        else
        {
          float f6 = f4 * 2048.0F;
          int n = (int)f6;
          float f7 = sqrtLut[n];
          float f8 = sqrtLut[(n + 1)] - f7;
          f6 = f7 + (f6 - n) * f8;
          m = (int)(f6 * fastGradientArraySize);
        }
        paramArrayOfInt[(paramInt1 + k)] = gradient[m];
        f4 += f5;
        f5 += f3;
        k++;
      }
      while (k < paramInt5)
      {
        paramArrayOfInt[(paramInt1 + k)] = i;
        k++;
      }
      paramInt1 += paramInt2;
      f1 += a01;
      f2 += a11;
    }
  }
  
  private void cyclicCircularGradientFillRaster(int[] paramArrayOfInt, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6)
  {
    double d1 = -radiusSq + centerX * centerX + centerY * centerY;
    float f1 = a00 * paramInt3 + a01 * paramInt4 + a02;
    float f2 = a10 * paramInt3 + a11 * paramInt4 + a12;
    float f3 = 2.0F * centerY;
    float f4 = -2.0F * centerX;
    int i = paramInt1;
    int j = paramInt5 + paramInt2;
    if (trivial == 0.0F)
    {
      k = indexIntoGradientsArrays(0.0F);
      for (int m = 0; m < paramInt6; m++)
      {
        for (int n = 0; n < paramInt5; n++) {
          paramArrayOfInt[(i + n)] = k;
        }
        i += j;
      }
      return;
    }
    for (int k = 0; k < paramInt6; k++)
    {
      float f11 = a01 * k + f1;
      float f12 = a11 * k + f2;
      for (int i1 = 0; i1 < paramInt5; i1++)
      {
        double d7;
        double d8;
        if (f11 == focusX)
        {
          d7 = focusX;
          d8 = centerY;
          d8 += (f12 > focusY ? trivial : -trivial);
        }
        else
        {
          double d5 = (f12 - focusY) / (f11 - focusX);
          double d6 = f12 - d5 * f11;
          double d2 = d5 * d5 + 1.0D;
          double d3 = f4 + -2.0D * d5 * (centerY - d6);
          double d4 = d1 + d6 * (d6 - f3);
          float f6 = (float)Math.sqrt(d3 * d3 - 4.0D * d2 * d4);
          d7 = -d3;
          d7 += (f11 < focusX ? -f6 : f6);
          d7 /= 2.0D * d2;
          d8 = d5 * d7 + d6;
        }
        float f9 = f11 - focusX;
        f9 *= f9;
        float f10 = f12 - focusY;
        f10 *= f10;
        float f7 = f9 + f10;
        f9 = (float)d7 - focusX;
        f9 *= f9;
        f10 = (float)d8 - focusY;
        f10 *= f10;
        float f8 = f9 + f10;
        if (f8 == 0.0F) {
          f8 = d8 >= focusY ? trivial : -trivial;
        }
        float f5 = (float)Math.sqrt(f7 / f8);
        paramArrayOfInt[(i + i1)] = indexIntoGradientsArrays(f5);
        f11 += a00;
        f12 += a10;
      }
      i += j;
    }
  }
  
  static
  {
    for (int i = 0; i < sqrtLut.length; i++) {
      sqrtLut[i] = ((float)Math.sqrt(i / 2048.0F));
    }
  }
}

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

import java.nio.ByteBuffer;

public final class Color
  extends Paint
{
  public static final Color WHITE = new Color(1.0F, 1.0F, 1.0F, 1.0F);
  public static final Color BLACK = new Color(0.0F, 0.0F, 0.0F, 1.0F);
  public static final Color RED = new Color(1.0F, 0.0F, 0.0F, 1.0F);
  public static final Color GREEN = new Color(0.0F, 1.0F, 0.0F, 1.0F);
  public static final Color BLUE = new Color(0.0F, 0.0F, 1.0F, 1.0F);
  public static final Color TRANSPARENT = new Color(0.0F, 0.0F, 0.0F, 0.0F);
  private final int argb;
  private final float r;
  private final float g;
  private final float b;
  private final float a;
  
  public Color(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4)
  {
    super(Paint.Type.COLOR, false);
    int i = (int)(255.0D * paramFloat4);
    int j = (int)(255.0D * paramFloat1 * paramFloat4);
    int k = (int)(255.0D * paramFloat2 * paramFloat4);
    int m = (int)(255.0D * paramFloat3 * paramFloat4);
    argb = (i << 24 | j << 16 | k << 8 | m << 0);
    r = paramFloat1;
    g = paramFloat2;
    b = paramFloat3;
    a = paramFloat4;
  }
  
  public int getIntArgbPre()
  {
    return argb;
  }
  
  public void putRgbaPreBytes(byte[] paramArrayOfByte, int paramInt)
  {
    paramArrayOfByte[(paramInt + 0)] = ((byte)(argb >> 16 & 0xFF));
    paramArrayOfByte[(paramInt + 1)] = ((byte)(argb >> 8 & 0xFF));
    paramArrayOfByte[(paramInt + 2)] = ((byte)(argb & 0xFF));
    paramArrayOfByte[(paramInt + 3)] = ((byte)(argb >> 24 & 0xFF));
  }
  
  public void putBgraPreBytes(ByteBuffer paramByteBuffer)
  {
    paramByteBuffer.put((byte)(argb & 0xFF));
    paramByteBuffer.put((byte)(argb >> 8 & 0xFF));
    paramByteBuffer.put((byte)(argb >> 16 & 0xFF));
    paramByteBuffer.put((byte)(argb >> 24 & 0xFF));
  }
  
  public float getRed()
  {
    return r;
  }
  
  public float getRedPremult()
  {
    return r * a;
  }
  
  public float getGreen()
  {
    return g;
  }
  
  public float getGreenPremult()
  {
    return g * a;
  }
  
  public float getBlue()
  {
    return b;
  }
  
  public float getBluePremult()
  {
    return b * a;
  }
  
  public float getAlpha()
  {
    return a;
  }
  
  public boolean isOpaque()
  {
    return a >= 1.0F;
  }
  
  public boolean equals(Object paramObject)
  {
    if (!(paramObject instanceof Color)) {
      return false;
    }
    Color localColor = (Color)paramObject;
    return (r == r) && (g == g) && (b == b) && (a == a);
  }
  
  public int hashCode()
  {
    int i = 3;
    i = 53 * i + Float.floatToIntBits(r);
    i = 53 * i + Float.floatToIntBits(g);
    i = 53 * i + Float.floatToIntBits(b);
    i = 53 * i + Float.floatToIntBits(a);
    return i;
  }
  
  public String toString()
  {
    return "Color[r=" + r + ", g=" + g + ", b=" + b + ", a=" + a + "]";
  }
}

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

import com.sun.javafx.geom.transform.BaseTransform;
import java.util.List;

public abstract class Gradient
  extends Paint
{
  public static final int PAD = 0;
  public static final int REFLECT = 1;
  public static final int REPEAT = 2;
  private final int numStops;
  private final List<Stop> stops;
  private final BaseTransform gradientTransform;
  private final int spreadMethod;
  private long cacheOffset = -1L;
  
  protected Gradient(Paint.Type paramType, BaseTransform paramBaseTransform, boolean paramBoolean, int paramInt, List<Stop> paramList)
  {
    super(paramType, paramBoolean);
    if (paramBaseTransform != null) {
      gradientTransform = paramBaseTransform.copy();
    } else {
      gradientTransform = BaseTransform.IDENTITY_TRANSFORM;
    }
    spreadMethod = paramInt;
    numStops = paramList.size();
    stops = paramList;
  }
  
  public int getSpreadMethod()
  {
    return spreadMethod;
  }
  
  public BaseTransform getGradientTransformNoClone()
  {
    return gradientTransform;
  }
  
  public int getNumStops()
  {
    return numStops;
  }
  
  public List<Stop> getStops()
  {
    return stops;
  }
  
  public void setGradientOffset(long paramLong)
  {
    cacheOffset = paramLong;
  }
  
  public long getGradientOffset()
  {
    return cacheOffset;
  }
  
  public boolean isOpaque()
  {
    for (int i = 0; i < numStops; i++) {
      if (!((Stop)stops.get(i)).getColor().isOpaque()) {
        return false;
      }
    }
    return true;
  }
}

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

import com.sun.prism.Image;
import com.sun.prism.PixelFormat;

public final class ImagePattern
  extends Paint
{
  private final Image image;
  private final float x;
  private final float y;
  private final float width;
  private final float height;
  
  public ImagePattern(Image paramImage, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, boolean paramBoolean)
  {
    super(Paint.Type.IMAGE_PATTERN, paramBoolean);
    if (paramImage == null) {
      throw new IllegalArgumentException("Image must be non-null");
    }
    image = paramImage;
    x = paramFloat1;
    y = paramFloat2;
    width = paramFloat3;
    height = paramFloat4;
  }
  
  public Image getImage()
  {
    return image;
  }
  
  public float getX()
  {
    return x;
  }
  
  public float getY()
  {
    return y;
  }
  
  public float getWidth()
  {
    return width;
  }
  
  public float getHeight()
  {
    return height;
  }
  
  public boolean isOpaque()
  {
    return image.getPixelFormat().isOpaque();
  }
}

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

import com.sun.javafx.geom.transform.BaseTransform;
import java.util.List;

public final class LinearGradient
  extends Gradient
{
  private float x1;
  private float y1;
  private float x2;
  private float y2;
  
  public LinearGradient(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, BaseTransform paramBaseTransform, boolean paramBoolean, int paramInt, List<Stop> paramList)
  {
    super(Paint.Type.LINEAR_GRADIENT, paramBaseTransform, paramBoolean, paramInt, paramList);
    x1 = paramFloat1;
    y1 = paramFloat2;
    x2 = paramFloat3;
    y2 = paramFloat4;
  }
  
  public float getX1()
  {
    return x1;
  }
  
  public float getY1()
  {
    return y1;
  }
  
  public float getX2()
  {
    return x2;
  }
  
  public float getY2()
  {
    return y2;
  }
}

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

public enum Paint$Type
{
  COLOR("Color", false, false),  LINEAR_GRADIENT("LinearGradient", true, false),  RADIAL_GRADIENT("RadialGradient", true, false),  IMAGE_PATTERN("ImagePattern", false, true);
  
  private String name;
  private boolean isGradient;
  private boolean isImagePattern;
  
  private Paint$Type(String paramString, boolean paramBoolean1, boolean paramBoolean2)
  {
    name = paramString;
    isGradient = paramBoolean1;
    isImagePattern = paramBoolean2;
  }
  
  public String getName()
  {
    return name;
  }
  
  public boolean isGradient()
  {
    return isGradient;
  }
  
  public boolean isImagePattern()
  {
    return isImagePattern;
  }
}

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

public abstract class Paint
{
  private final Type type;
  private final boolean proportional;
  
  Paint(Type paramType, boolean paramBoolean)
  {
    type = paramType;
    proportional = paramBoolean;
  }
  
  public final Type getType()
  {
    return type;
  }
  
  public boolean isProportional()
  {
    return proportional;
  }
  
  public abstract boolean isOpaque();
  
  public static enum Type
  {
    COLOR("Color", false, false),  LINEAR_GRADIENT("LinearGradient", true, false),  RADIAL_GRADIENT("RadialGradient", true, false),  IMAGE_PATTERN("ImagePattern", false, true);
    
    private String name;
    private boolean isGradient;
    private boolean isImagePattern;
    
    private Type(String paramString, boolean paramBoolean1, boolean paramBoolean2)
    {
      name = paramString;
      isGradient = paramBoolean1;
      isImagePattern = paramBoolean2;
    }
    
    public String getName()
    {
      return name;
    }
    
    public boolean isGradient()
    {
      return isGradient;
    }
    
    public boolean isImagePattern()
    {
      return isImagePattern;
    }
  }
}

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

import com.sun.javafx.geom.transform.BaseTransform;
import java.util.List;

public final class RadialGradient
  extends Gradient
{
  private final float centerX;
  private final float centerY;
  private final float focusAngle;
  private final float focusDistance;
  private final float radius;
  
  public RadialGradient(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, BaseTransform paramBaseTransform, boolean paramBoolean, int paramInt, List<Stop> paramList)
  {
    super(Paint.Type.RADIAL_GRADIENT, paramBaseTransform, paramBoolean, paramInt, paramList);
    centerX = paramFloat1;
    centerY = paramFloat2;
    focusAngle = paramFloat3;
    focusDistance = paramFloat4;
    radius = paramFloat5;
  }
  
  public float getCenterX()
  {
    return centerX;
  }
  
  public float getCenterY()
  {
    return centerY;
  }
  
  public float getFocusAngle()
  {
    return focusAngle;
  }
  
  public float getFocusDistance()
  {
    return focusDistance;
  }
  
  public float getRadius()
  {
    return radius;
  }
  
  public String toString()
  {
    return "RadialGradient: FocusAngle: " + focusAngle + " FocusDistance: " + focusDistance + " CenterX: " + centerX + " CenterY " + centerY + " Radius: " + radius + "stops:" + getStops();
  }
}

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

public class Stop
{
  private final Color color;
  private final float offset;
  
  public Stop(Color paramColor, float paramFloat)
  {
    color = paramColor;
    offset = paramFloat;
  }
  
  public Color getColor()
  {
    return color;
  }
  
  public float getOffset()
  {
    return offset;
  }
}

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

import com.sun.prism.GraphicsResource;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;

public abstract interface Shader
  extends GraphicsResource
{
  public abstract void enable();
  
  public abstract void disable();
  
  public abstract boolean isValid();
  
  public abstract void setConstant(String paramString, int paramInt);
  
  public abstract void setConstant(String paramString, int paramInt1, int paramInt2);
  
  public abstract void setConstant(String paramString, int paramInt1, int paramInt2, int paramInt3);
  
  public abstract void setConstant(String paramString, int paramInt1, int paramInt2, int paramInt3, int paramInt4);
  
  public abstract void setConstants(String paramString, IntBuffer paramIntBuffer, int paramInt1, int paramInt2);
  
  public abstract void setConstant(String paramString, float paramFloat);
  
  public abstract void setConstant(String paramString, float paramFloat1, float paramFloat2);
  
  public abstract void setConstant(String paramString, float paramFloat1, float paramFloat2, float paramFloat3);
  
  public abstract void setConstant(String paramString, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4);
  
  public abstract void setConstants(String paramString, FloatBuffer paramFloatBuffer, int paramInt1, int paramInt2);
}

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

import com.sun.prism.ResourceFactory;
import java.io.InputStream;
import java.util.Map;

public abstract interface ShaderFactory
  extends ResourceFactory
{
  public abstract Shader createShader(InputStream paramInputStream, Map<String, Integer> paramMap1, Map<String, Integer> paramMap2, int paramInt, boolean paramBoolean1, boolean paramBoolean2);
  
  public abstract Shader createStockShader(String paramString);
}

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

import com.sun.javafx.geom.transform.Affine3D;
import com.sun.prism.Graphics;
import com.sun.prism.Texture;

public abstract interface ShaderGraphics
  extends Graphics
{
  public abstract void getPaintShaderTransform(Affine3D paramAffine3D);
  
  public abstract void setExternalShader(Shader paramShader);
  
  public abstract void drawTextureRaw2(Texture paramTexture1, Texture paramTexture2, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6, float paramFloat7, float paramFloat8, float paramFloat9, float paramFloat10, float paramFloat11, float paramFloat12);
  
  public abstract void drawMappedTextureRaw2(Texture paramTexture1, Texture paramTexture2, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6, float paramFloat7, float paramFloat8, float paramFloat9, float paramFloat10, float paramFloat11, float paramFloat12, float paramFloat13, float paramFloat14, float paramFloat15, float paramFloat16, float paramFloat17, float paramFloat18, float paramFloat19, float paramFloat20);
}

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

public abstract interface CompletionListener
{
  public abstract void done(RenderJob paramRenderJob);
}

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

import java.io.PrintStream;
import java.util.concurrent.CancellationException;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

public class RenderJob
  extends FutureTask
{
  private CompletionListener listener;
  private Object futureReturn;
  
  public RenderJob(Runnable paramRunnable)
  {
    super(paramRunnable, null);
  }
  
  public RenderJob(Runnable paramRunnable, CompletionListener paramCompletionListener)
  {
    super(paramRunnable, null);
    setCompletionListener(paramCompletionListener);
  }
  
  public void setCompletionListener(CompletionListener paramCompletionListener)
  {
    listener = paramCompletionListener;
  }
  
  public void run()
  {
    if (!super.runAndReset()) {
      try
      {
        Object localObject = super.get();
        System.err.println("RenderJob.run: failed no exception: " + localObject);
      }
      catch (CancellationException localCancellationException)
      {
        System.err.println("RenderJob.run: task cancelled");
      }
      catch (ExecutionException localExecutionException)
      {
        System.err.println("RenderJob.run: internal exception");
        localExecutionException.getCause().printStackTrace();
      }
      catch (Throwable localThrowable1)
      {
        localThrowable1.printStackTrace();
      }
    } else if (listener != null) {
      try
      {
        listener.done(this);
      }
      catch (Throwable localThrowable2)
      {
        localThrowable2.printStackTrace();
      }
    }
  }
  
  public Object get()
  {
    return futureReturn;
  }
  
  public void setFutureReturn(Object paramObject)
  {
    futureReturn = paramObject;
  }
}

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

import java.util.concurrent.Future;

public abstract interface ToolkitInterface
{
  public abstract Future addRenderJob(RenderJob paramRenderJob);
}

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

import com.sun.prism.ps.Shader;
import com.sun.prism.ps.ShaderFactory;
import java.io.InputStream;
import java.util.HashMap;

public class DrawCircle_Color_Loader
{
  public static Shader loadShader(ShaderFactory paramShaderFactory, InputStream paramInputStream)
  {
    HashMap localHashMap1 = new HashMap();
    HashMap localHashMap2 = new HashMap();
    localHashMap2.put("idim", Integer.valueOf(0));
    return paramShaderFactory.createShader(paramInputStream, localHashMap1, localHashMap2, 1, false, true);
  }
}

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

import com.sun.prism.ps.Shader;
import com.sun.prism.ps.ShaderFactory;
import java.io.InputStream;
import java.util.HashMap;

public class DrawCircle_ImagePattern_Loader
{
  public static Shader loadShader(ShaderFactory paramShaderFactory, I
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