jfxrt

t4)
  {
    tmpEllipse.setFrame(paramFloat1, paramFloat2, paramFloat3, paramFloat4);
    return tmpEllipse;
  }
  
  private static java.awt.Shape tmpRRect(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6)
  {
    tmpRRect.setRoundRect(paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6);
    return tmpRRect;
  }
  
  private static java.awt.Shape tmpLine(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4)
  {
    tmpLine.setLine(paramFloat1, paramFloat2, paramFloat3, paramFloat4);
    return tmpLine;
  }
  
  private static java.awt.Shape tmpShape(com.sun.javafx.geom.Shape paramShape)
  {
    tmpAdaptor.setShape(paramShape);
    return tmpAdaptor;
  }
  
  public J2DPrismGraphics(J2DPresentable paramJ2DPresentable, Graphics2D paramGraphics2D)
  {
    this(paramGraphics2D, paramJ2DPresentable.getContentWidth(), paramJ2DPresentable.getContentHeight());
    target = paramJ2DPresentable;
  }
  
  public J2DPrismGraphics(Graphics2D paramGraphics2D, int paramInt1, int paramInt2)
  {
    g2d = paramGraphics2D;
    transform = new Affine2D();
    devClipRect = new RectBounds(0.0F, 0.0F, paramInt1, paramInt2);
    finalClipRect = new RectBounds(0.0F, 0.0F, paramInt1, paramInt2);
    cull = true;
    paramGraphics2D.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_PURE);
    paramGraphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
    paramGraphics2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
    paramGraphics2D.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
    paramGraphics2D.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
    setTransform(BaseTransform.IDENTITY_TRANSFORM);
    setPaint(DEFAULT_PAINT);
    setStroke(DEFAULT_STROKE);
  }
  
  public RenderTarget getRenderTarget()
  {
    return target;
  }
  
  public Screen getAssociatedScreen()
  {
    return target.getAssociatedScreen();
  }
  
  public ResourceFactory getResourceFactory()
  {
    return target.getResourceFactory();
  }
  
  public void reset() {}
  
  public com.sun.javafx.geom.Rectangle getClipRect()
  {
    return clipRect == null ? null : new com.sun.javafx.geom.Rectangle(clipRect);
  }
  
  public com.sun.javafx.geom.Rectangle getClipRectNoClone()
  {
    return clipRect;
  }
  
  public RectBounds getFinalClipNoClone()
  {
    return finalClipRect;
  }
  
  public void setClipRect(com.sun.javafx.geom.Rectangle paramRectangle)
  {
    finalClipRect.setBounds(devClipRect);
    if (paramRectangle == null)
    {
      clipRect = null;
      g2d.setClip(null);
    }
    else
    {
      clipRect = new com.sun.javafx.geom.Rectangle(paramRectangle);
      finalClipRect.intersectWith(paramRectangle);
      g2d.setTransform(J2D_IDENTITY);
      g2d.setClip(x, y, width, height);
      g2d.setTransform(tmpJ2DTransform(transform));
    }
  }
  
  private AlphaComposite getAWTComposite()
  {
    return (AlphaComposite)g2d.getComposite();
  }
  
  public float getExtraAlpha()
  {
    return getAWTComposite().getAlpha();
  }
  
  public void setExtraAlpha(float paramFloat)
  {
    g2d.setComposite(getAWTComposite().derive(paramFloat));
  }
  
  public CompositeMode getCompositeMode()
  {
    int i = getAWTComposite().getRule();
    switch (i)
    {
    case 1: 
      return CompositeMode.CLEAR;
    case 2: 
      return CompositeMode.SRC;
    case 3: 
      return CompositeMode.SRC_OVER;
    }
    throw new InternalError("Unrecognized AlphaCompsite rule: " + i);
  }
  
  public void setCompositeMode(CompositeMode paramCompositeMode)
  {
    AlphaComposite localAlphaComposite = getAWTComposite();
    switch (paramCompositeMode)
    {
    case CLEAR: 
      localAlphaComposite = localAlphaComposite.derive(1);
      break;
    case SRC: 
      localAlphaComposite = localAlphaComposite.derive(2);
      break;
    case SRC_OVER: 
      localAlphaComposite = localAlphaComposite.derive(3);
      break;
    default: 
      throw new InternalError("Unrecognized composite mode: " + paramCompositeMode);
    }
    g2d.setComposite(localAlphaComposite);
  }
  
  public com.sun.prism.paint.Paint getPaint()
  {
    return paint;
  }
  
  public void setPaint(com.sun.prism.paint.Paint paramPaint)
  {
    paint = paramPaint;
    java.awt.Paint localPaint = toJ2DPaint(paramPaint, null);
    if (localPaint == null)
    {
      paintWasProportional = true;
    }
    else
    {
      paintWasProportional = false;
      g2d.setPaint(localPaint);
    }
  }
  
  public com.sun.prism.BasicStroke getStroke()
  {
    return stroke;
  }
  
  public void setStroke(com.sun.prism.BasicStroke paramBasicStroke)
  {
    stroke = paramBasicStroke;
    g2d.setStroke(toJ2DStroke(paramBasicStroke));
  }
  
  public BaseTransform getTransformNoClone()
  {
    return transform;
  }
  
  public void translate(float paramFloat1, float paramFloat2)
  {
    transform.translate(paramFloat1, paramFloat2);
    g2d.translate(paramFloat1, paramFloat2);
  }
  
  public void scale(float paramFloat1, float paramFloat2)
  {
    transform.scale(paramFloat1, paramFloat2);
    g2d.scale(paramFloat1, paramFloat2);
  }
  
  public void transform(BaseTransform paramBaseTransform)
  {
    if (!paramBaseTransform.is2D()) {
      return;
    }
    transform.concatenate(paramBaseTransform);
    g2d.setTransform(tmpJ2DTransform(transform));
  }
  
  public void setTransform(BaseTransform paramBaseTransform)
  {
    if (paramBaseTransform == null) {
      paramBaseTransform = BaseTransform.IDENTITY_TRANSFORM;
    }
    transform.setTransform(paramBaseTransform);
    g2d.setTransform(tmpJ2DTransform(transform));
  }
  
  public void setTransform(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, double paramDouble5, double paramDouble6)
  {
    transform.setTransform(paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6);
    g2d.setTransform(tmpJ2DTransform(transform));
  }
  
  public void clear()
  {
    clear(com.sun.prism.paint.Color.TRANSPARENT);
  }
  
  public void clear(com.sun.prism.paint.Color paramColor)
  {
    getRenderTarget().setOpaque(paramColor.isOpaque());
    clear(toJ2DColor(paramColor));
  }
  
  public void clear(java.awt.Color paramColor)
  {
    Graphics2D localGraphics2D = (Graphics2D)g2d.create();
    localGraphics2D.setTransform(J2D_IDENTITY);
    localGraphics2D.setComposite(AlphaComposite.Src);
    localGraphics2D.setColor(paramColor);
    localGraphics2D.fillRect(0, 0, target.getContentWidth(), target.getContentHeight());
    localGraphics2D.dispose();
  }
  
  public void clearQuad(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4)
  {
    g2d.setComposite(AlphaComposite.Clear);
    g2d.fill(tmpQuad(paramFloat1, paramFloat2, paramFloat3, paramFloat4));
  }
  
  public void fill(java.awt.Shape paramShape)
  {
    if (paintWasProportional) {
      if (nodeBounds != null) {
        g2d.setPaint(toJ2DPaint(paint, nodeBounds));
      } else {
        g2d.setPaint(toJ2DPaint(paint, paramShape.getBounds2D()));
      }
    }
    g2d.fill(paramShape);
  }
  
  public void fill(com.sun.javafx.geom.Shape paramShape)
  {
    fill(tmpShape(paramShape));
  }
  
  public void fillRect(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4)
  {
    fill(tmpRect(paramFloat1, paramFloat2, paramFloat3, paramFloat4));
  }
  
  public void fillRoundRect(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6)
  {
    fill(tmpRRect(paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6));
  }
  
  public void fillEllipse(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4)
  {
    fill(tmpEllipse(paramFloat1, paramFloat2, paramFloat3, paramFloat4));
  }
  
  public void fillQuad(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4)
  {
    fill(tmpQuad(paramFloat1, paramFloat2, paramFloat3, paramFloat4));
  }
  
  public void draw(java.awt.Shape paramShape)
  {
    if (paintWasProportional) {
      if (nodeBounds != null) {
        g2d.setPaint(toJ2DPaint(paint, nodeBounds));
      } else {
        g2d.setPaint(toJ2DPaint(paint, paramShape.getBounds2D()));
      }
    }
    try
    {
      g2d.draw(paramShape);
    }
    catch (Throwable localThrowable) {}
  }
  
  public void draw(com.sun.javafx.geom.Shape paramShape)
  {
    draw(tmpShape(paramShape));
  }
  
  public void drawLine(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4)
  {
    draw(tmpLine(paramFloat1, paramFloat2, paramFloat3, paramFloat4));
  }
  
  public void drawRect(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4)
  {
    draw(tmpRect(paramFloat1, paramFloat2, paramFloat3, paramFloat4));
  }
  
  public void drawRoundRect(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6)
  {
    draw(tmpRRect(paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6));
  }
  
  public void drawEllipse(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4)
  {
    draw(tmpEllipse(paramFloat1, paramFloat2, paramFloat3, paramFloat4));
  }
  
  public void setNodeBounds(RectBounds paramRectBounds)
  {
    nodeBounds = (paramRectBounds != null ? new Rectangle2D.Float(paramRectBounds.getMinX(), paramRectBounds.getMinY(), paramRectBounds.getWidth(), paramRectBounds.getHeight()) : null);
  }
  
  public void drawString(String paramString, FontStrike paramFontStrike, float paramFloat1, float paramFloat2, com.sun.prism.paint.Color paramColor, int paramInt1, int paramInt2)
  {
    g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
    if (paramFontStrike.getAAMode() == 1) {
      g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB);
    }
    int i = 0;
    int j = paramString.length();
    int k = 0;
    CompositeStrike localCompositeStrike = null;
    CharToGlyphMapper localCharToGlyphMapper = null;
    int n;
    int m;
    if ((paramFontStrike instanceof CompositeStrike))
    {
      localCompositeStrike = (CompositeStrike)paramFontStrike;
      localCharToGlyphMapper = localCompositeStrike.getFontResource().getGlyphMapper();
      n = localCharToGlyphMapper.getGlyphCode(paramString.charAt(0));
      m = localCompositeStrike.getStrikeSlotForGlyph(n);
      paramFontStrike = localCompositeStrike.getStrikeSlot(m);
      for (k = 1; k < j; k++)
      {
        n = localCharToGlyphMapper.getGlyphCode(paramString.charAt(k));
        if (m != localCompositeStrike.getStrikeSlotForGlyph(n))
        {
          i = 1;
          break;
        }
      }
    }
    Font localFont = toJ2DFont(paramFontStrike);
    AttributedString localAttributedString = null;
    if (i != 0)
    {
      localAttributedString = new AttributedString(paramString);
      localAttributedString.addAttribute(TextAttribute.FONT, localFont, 0, k);
      int i1 = k;
      int i2 = j;
      for (int i3 = j; i1 < i3; i3 = i2)
      {
        n = localCharToGlyphMapper.getGlyphCode(paramString.charAt(k));
        m = localCompositeStrike.getStrikeSlotForGlyph(n);
        localFont = toJ2DFont(localCompositeStrike.getStrikeSlot(m));
        for (;;)
        {
          k++;
          if (k < i3)
          {
            n = localCharToGlyphMapper.getGlyphCode(paramString.charAt(k));
            if (m != localCompositeStrike.getStrikeSlotForGlyph(n)) {
              break;
            }
          }
        }
        if (i1 < k) {
          localAttributedString.addAttribute(TextAttribute.FONT, localFont, i1, k);
        }
        while (i2 > k)
        {
          n = localCharToGlyphMapper.getGlyphCode(paramString.charAt(i2 - 1));
          if (m != localCompositeStrike.getStrikeSlotForGlyph(n)) {
            break;
          }
          i2--;
        }
        if (i2 < i3) {
          localAttributedString.addAttribute(TextAttribute.FONT, localFont, i2, i3);
        }
        i1 = k;
      }
    }
    if (paintWasProportional)
    {
      Object localObject = nodeBounds;
      if (localObject == null) {
        if (localAttributedString == null)
        {
          localObject = localFont.getStringBounds(paramString, g2d.getFontRenderContext());
        }
        else
        {
          TextLayout localTextLayout = new TextLayout(localAttributedString.getIterator(), g2d.getFontRenderContext());
          localObject = new Rectangle2D.Float(0.0F, -localTextLayout.getAscent(), localTextLayout.getAdvance(), localTextLayout.getAscent() + localTextLayout.getDescent() + localTextLayout.getLeading());
        }
      }
      g2d.setPaint(toJ2DPaint(paint, (Rectangle2D)localObject));
    }
    if (paramColor != null)
    {
      paramInt1 = paramInt1 < 0 ? 0 : paramInt1;
      paramInt2 = paramInt2 < j ? paramInt2 : j;
      if (paramInt1 < paramInt2)
      {
        if (localAttributedString == null)
        {
          localAttributedString = new AttributedString(paramString);
          localAttributedString.addAttribute(TextAttribute.FONT, localFont, 0, j);
        }
        localAttributedString.addAttribute(TextAttribute.FOREGROUND, toJ2DColor(paramColor), paramInt1, paramInt2);
      }
    }
    if (localAttributedString != null)
    {
      g2d.drawString(localAttributedString.getIterator(), paramFloat1, paramFloat2);
    }
    else
    {
      g2d.setFont(localFont);
      g2d.drawString(paramString, paramFloat1, paramFloat2);
    }
    g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
    g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
  }
  
  public void drawString(String paramString, FontStrike paramFontStrike, float paramFloat1, float paramFloat2)
  {
    drawString(paramString, paramFontStrike, paramFloat1, paramFloat2, null, 0, 0);
  }
  
  public void drawMappedTextureRaw(Texture paramTexture, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6, float paramFloat7, float paramFloat8, float paramFloat9, float paramFloat10, float paramFloat11, float paramFloat12)
  {
    BufferedImage localBufferedImage = ((J2DTexture)paramTexture).getBufferedImage();
    float f1 = paramFloat7 - paramFloat5;
    float f2 = paramFloat8 - paramFloat6;
    float f3 = paramFloat9 - paramFloat5;
    float f4 = paramFloat10 - paramFloat6;
    g2d.setTransform(J2D_IDENTITY);
    tmpAT.setTransform(f1, f2, f3, f4, paramFloat5, paramFloat6);
    try
    {
      tmpAT.invert();
      g2d.translate(paramFloat1, paramFloat2);
      g2d.scale(paramFloat3 - paramFloat1, paramFloat4 - paramFloat2);
      g2d.transform(tmpAT);
      g2d.drawImage(localBufferedImage, 0, 0, 1, 1, null);
    }
    catch (NoninvertibleTransformException localNoninvertibleTransformException) {}
    setTransform(transform);
  }
  
  public void drawTexture(Texture paramTexture, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4)
  {
    BufferedImage localBufferedImage = ((J2DTexture)paramTexture).getBufferedImage();
    g2d.drawImage(localBufferedImage, (int)paramFloat1, (int)paramFloat2, (int)(paramFloat1 + paramFloat3), (int)(paramFloat2 + paramFloat4), 0, 0, (int)paramFloat3, (int)paramFloat4, null);
  }
  
  public void drawTexture(Texture paramTexture, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6, float paramFloat7, float paramFloat8)
  {
    BufferedImage localBufferedImage = ((J2DTexture)paramTexture).getBufferedImage();
    g2d.drawImage(localBufferedImage, (int)paramFloat1, (int)paramFloat2, (int)paramFloat3, (int)paramFloat4, (int)paramFloat5, (int)paramFloat6, (int)paramFloat7, (int)paramFloat8, null);
  }
  
  public void drawTexture(Texture paramTexture, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6, float paramFloat7, float paramFloat8, int paramInt)
  {
    BufferedImage localBufferedImage = ((J2DTexture)paramTexture).getBufferedImage();
    g2d.drawImage(localBufferedImage, (int)paramFloat1, (int)paramFloat2, (int)paramFloat3, (int)paramFloat4, (int)paramFloat5, (int)paramFloat6, (int)paramFloat7, (int)paramFloat8, null);
  }
  
  public void drawTextureRaw(Texture paramTexture, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6, float paramFloat7, float paramFloat8)
  {
    int i = paramTexture.getContentWidth();
    int j = paramTexture.getContentHeight();
    paramFloat5 *= i;
    paramFloat6 *= j;
    paramFloat7 *= i;
    paramFloat8 *= j;
    drawTexture(paramTexture, paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6, paramFloat7, paramFloat8);
  }
  
  public void drawTextureVO(Texture paramTexture, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6, float paramFloat7, float paramFloat8, float paramFloat9, float paramFloat10, int paramInt)
  {
    java.awt.Paint localPaint = g2d.getPaint();
    Composite localComposite = g2d.getComposite();
    java.awt.Color localColor1 = new java.awt.Color(1.0F, 1.0F, 1.0F, paramFloat1);
    java.awt.Color localColor2 = new java.awt.Color(1.0F, 1.0F, 1.0F, paramFloat2);
    g2d.setPaint(new GradientPaint(0.0F, paramFloat4, localColor1, 0.0F, paramFloat6, localColor2, true));
    g2d.setComposite(AlphaComposite.Src);
    int i = (int)Math.floor(Math.min(paramFloat3, paramFloat5));
    int j = (int)Math.floor(Math.min(paramFloat4, paramFloat6));
    int k = (int)Math.ceil(Math.max(paramFloat3, paramFloat5)) - i;
    int m = (int)Math.ceil(Math.max(paramFloat4, paramFloat6)) - j;
    g2d.fillRect(i, j, k, m);
    g2d.setComposite(AlphaComposite.SrcIn);
    drawTexture(paramTexture, paramFloat3, paramFloat4, paramFloat5, paramFloat6, paramFloat7, paramFloat8, paramFloat9, paramFloat10);
    g2d.setComposite(localComposite);
    g2d.setPaint(localPaint);
  }
  
  public void drawPixelsMasked(RTTexture paramRTTexture1, RTTexture paramRTTexture2, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8)
  {
    doDrawMaskTexture((J2DRTTexture)paramRTTexture1, (J2DRTTexture)paramRTTexture2, paramInt1, paramInt2, paramInt3, paramInt4, paramInt5, paramInt6, paramInt7, paramInt8, true);
  }
  
  public void maskInterpolatePixels(RTTexture paramRTTexture1, RTTexture paramRTTexture2, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8)
  {
    doDrawMaskTexture((J2DRTTexture)paramRTTexture1, (J2DRTTexture)paramRTTexture2, paramInt1, paramInt2, paramInt3, paramInt4, paramInt5, paramInt6, paramInt7, paramInt8, false);
  }
  
  private void doDrawMaskTexture(J2DRTTexture paramJ2DRTTexture1, J2DRTTexture paramJ2DRTTexture2, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8, boolean paramBoolean)
  {
    int i = clipRect.x;
    int j = clipRect.y;
    int k = i + clipRect.width;
    int m = j + clipRect.height;
    if ((paramInt3 <= 0) || (paramInt4 <= 0)) {
      return;
    }
    if (paramInt1 < i)
    {
      n = i - paramInt1;
      if (paramInt3 -= n <= 0) {
        return;
      }
      paramInt5 += n;
      paramInt7 += n;
      paramInt1 = i;
    }
    if (paramInt2 < j)
    {
      n = j - paramInt2;
      if (paramInt4 -= n <= 0) {
        return;
      }
      paramInt6 += n;
      paramInt8 += n;
      paramInt2 = j;
    }
    if ((paramInt1 + paramInt3 > k) && ((paramInt3 = k - paramInt1) <= 0)) {
      return;
    }
    if ((paramInt2 + paramInt4 > m) && ((paramInt4 = m - paramInt2) <= 0)) {
      return;
    }
    int n = paramJ2DRTTexture1.getContentWidth();
    int i1 = paramJ2DRTTexture1.getContentHeight();
    if (paramInt5 < 0)
    {
      if (paramInt3 += paramInt5 <= 0) {
        return;
      }
      paramInt1 -= paramInt5;
      paramInt7 -= paramInt5;
      paramInt5 = 0;
    }
    if (paramInt6 < 0)
    {
      if (paramInt4 += paramInt6 <= 0) {
        return;
      }
      paramInt2 -= paramInt6;
      paramInt8 -= paramInt6;
      paramInt6 = 0;
    }
    if ((paramInt5 + paramInt3 > n) && ((paramInt3 = n - paramInt5) <= 0)) {
      return;
    }
    if ((paramInt6 + paramInt4 > i1) && ((paramInt4 = i1 - paramInt6) <= 0)) {
      return;
    }
    int i2 = paramJ2DRTTexture2.getContentWidth();
    int i3 = paramJ2DRTTexture2.getContentHeight();
    if (paramInt7 < 0)
    {
      if (paramInt3 += paramInt7 <= 0) {
        return;
      }
      paramInt1 -= paramInt7;
      paramInt5 -= paramInt7;
      paramInt7 = 0;
    }
    if (paramInt8 < 0)
    {
      if (paramInt4 += paramInt8 <= 0) {
        return;
      }
      paramInt2 -= paramInt8;
      paramInt6 -= paramInt8;
      paramInt8 = 0;
    }
    if ((paramInt7 + paramInt3 > i2) && ((paramInt3 = i2 - paramInt7) <= 0)) {
      return;
    }
    if ((paramInt8 + paramInt4 > i3) && ((paramInt4 = i3 - paramInt8) <= 0)) {
      return;
    }
    int[] arrayOfInt1 = paramJ2DRTTexture1.getPixels();
    int[] arrayOfInt2 = paramJ2DRTTexture2.getPixels();
    DataBuffer localDataBuffer = target.getBackBuffer().getRaster().getDataBuffer();
    int[] arrayOfInt3 = ((DataBufferInt)localDataBuffer).getData();
    int i4 = paramJ2DRTTexture1.getBufferedImage().getWidth();
    int i5 = paramJ2DRTTexture2.getBufferedImage().getWidth();
    int i6 = target.getBackBuffer().getWidth();
    int i7 = paramInt6 * i4 + paramInt5;
    int i8 = paramInt8 * i5 + paramInt7;
    int i9 = paramInt2 * i6 + paramInt1;
    int i10;
    int i11;
    int i16;
    int i17;
    int i12;
    int i13;
    int i14;
    int i15;
    if (paramBoolean) {
      for (i10 = 0; i10 < paramInt4; i10++)
      {
        for (i11 = 0; i11 < paramInt3; i11++)
        {
          i16 = arrayOfInt2[(i8 + i11)] >>> 24;
          if (i16 != 0)
          {
            i17 = arrayOfInt1[(i7 + i11)];
            i12 = i17 >>> 24;
            if (i12 != 0)
            {
              if (i16 < 255)
              {
                i16 += (i16 >> 7);
                i12 *= i16;
                i13 = (i17 >> 16 & 0xFF) * i16;
                i14 = (i17 >> 8 & 0xFF) * i16;
                i15 = (i17 & 0xFF) * i16;
              }
              else if (i12 < 255)
              {
                i12 <<= 8;
                i13 = (i17 >> 16 & 0xFF) << 8;
                i14 = (i17 >> 8 & 0xFF) << 8;
                i15 = (i17 & 0xFF) << 8;
              }
              else
              {
                arrayOfInt3[(i9 + i11)] = i17;
                continue;
              }
              i16 = i12 + 128 >> 8;
              i16 += (i16 >> 7);
              i16 = 256 - i16;
              i17 = arrayOfInt3[(i9 + i11)];
              i12 += (i17 >>> 24) * i16 + 128;
              i13 += (i17 >> 16 & 0xFF) * i16 + 128;
              i14 += (i17 >> 8 & 0xFF) * i16 + 128;
              i15 += (i17 & 0xFF) * i16 + 128;
              i17 = (i12 >> 8 << 24) + (i13 >> 8 << 16) + (i14 >> 8 << 8) + (i15 >> 8);
              arrayOfInt3[(i9 + i11)] = i17;
            }
          }
        }
        i7 += i4;
        i8 += i5;
        i9 += i6;
      }
    } else {
      for (i10 = 0; i10 < paramInt4; i10++)
      {
        for (i11 = 0; i11 < paramInt3; i11++)
        {
          i12 = arrayOfInt2[(i8 + i11)] >>> 24;
          if (i12 != 0)
          {
            i13 = arrayOfInt1[(i7 + i11)];
            if (i12 < 255)
            {
              i12 += (i12 >> 7);
              i14 = (i13 >>> 24) * i12;
              i15 = (i13 >> 16 & 0xFF) * i12;
              i16 = (i13 >> 8 & 0xFF) * i12;
              i17 = (i13 & 0xFF) * i12;
              i12 = 256 - i12;
              i13 = arrayOfInt3[(i9 + i11)];
              i14 += (i13 >>> 24) * i12 + 128;
              i15 += (i13 >> 16 & 0xFF) * i12 + 128;
              i16 += (i13 >> 8 & 0xFF) * i12 + 128;
              i17 += (i13 & 0xFF) * i12 + 128;
              i13 = (i14 >> 8 << 24) + (i15 >> 8 << 16) + (i16 >> 8 << 8) + (i17 >> 8);
            }
            arrayOfInt3[(i9 + i11)] = i13;
          }
        }
        i7 += i4;
        i8 += i5;
        i9 += i6;
      }
    }
  }
  
  public boolean canReadBack()
  {
    return true;
  }
  
  public RTTexture readBack(com.sun.javafx.geom.Rectangle paramRectangle)
  {
    J2DRTTexture localJ2DRTTexture = target.getReadbackBuffer();
    Graphics2D localGraphics2D = localJ2DRTTexture.createAWTGraphics2D();
    localGraphics2D.setComposite(AlphaComposite.Src);
    int i = x;
    int j = y;
    int k = width;
    int m = height;
    int n = i + k;
    int i1 = j + m;
    localGraphics2D.drawImage(target.getBackBuffer(), 0, 0, k, m, i, j, n, i1, null);
    localGraphics2D.dispose();
    return localJ2DRTTexture;
  }
  
  public void releaseReadBackBuffer(RTTexture paramRTTexture) {}
  
  public PrismCameraImpl getCameraNoClone()
  {
    throw new UnsupportedOperationException("Not supported yet.");
  }
  
  public boolean hasOrthoCamera()
  {
    throw new UnsupportedOperationException("Not supported yet.");
  }
  
  public boolean isDepthBuffer()
  {
    return false;
  }
  
  public boolean isDepthTest()
  {
    return false;
  }
  
  public void scale(float paramFloat1, float paramFloat2, float paramFloat3)
  {
    throw new UnsupportedOperationException("Not supported yet.");
  }
  
  public void setTransform3D(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, double paramDouble5, double paramDouble6, double paramDouble7, double paramDouble8, double paramDouble9, double paramDouble10, double paramDouble11, double paramDouble12)
  {
    if ((paramDouble3 != 0.0D) || (paramDouble7 != 0.0D) || (paramDouble9 != 0.0D) || (paramDouble10 != 0.0D) || (paramDouble11 != 1.0D) || (paramDouble12 != 0.0D)) {
      throw new UnsupportedOperationException("3D transforms not supported.");
    }
    setTransform(paramDouble1, paramDouble5, paramDouble2, paramDouble6, paramDouble4, paramDouble8);
  }
  
  public void setCamera(PrismCameraImpl paramPrismCameraImpl) {}
  
  public void setDepthBuffer(boolean paramBoolean) {}
  
  public void setDepthTest(boolean paramBoolean) {}
  
  public void sync() {}
  
  public void translate(float paramFloat1, float paramFloat2, float paramFloat3)
  {
    throw new UnsupportedOperationException("Not supported yet.");
  }
  
  public void setWindowProjViewTx(GeneralTransform3D paramGeneralTransform3D)
  {
    pvTx = paramGeneralTransform3D;
  }
  
  public GeneralTransform3D getWindowProjViewTxNoClone()
  {
    return pvTx;
  }
  
  public void setCulling(boolean paramBoolean)
  {
    cull = paramBoolean;
  }
  
  public boolean isCulling()
  {
    return cull;
  }
  
  public void setClipRectIndex(int paramInt)
  {
    clipRectIndex = paramInt;
  }
  
  public int getClipRectIndex()
  {
    return clipRectIndex;
  }
  
  public void setHasPreCullingBits(boolean paramBoolean)
  {
    hasPreCullingBits = paramBoolean;
  }
  
  public boolean hasPreCullingBits()
  {
    return hasPreCullingBits;
  }
  
  private static class AdaptorPathIterator
    implements java.awt.geom.PathIterator
  {
    private static int[] NUM_COORDS = { 2, 2, 4, 6, 0 };
    com.sun.javafx.geom.PathIterator priterator;
    float[] tmpcoords;
    
    public void setIterator(com.sun.javafx.geom.PathIterator paramPathIterator)
    {
      priterator = paramPathIterator;
    }
    
    public int currentSegment(float[] paramArrayOfFloat)
    {
      return priterator.currentSegment(paramArrayOfFloat);
    }
    
    public int currentSegment(double[] paramArrayOfDouble)
    {
      if (tmpcoords == null) {
        tmpcoords = new float[6];
      }
      int i = priterator.currentSegment(tmpcoords);
      for (int j = 0; j < NUM_COORDS[i]; j++) {
        paramArrayOfDouble[j] = tmpcoords[j];
      }
      return i;
    }
    
    public int getWindingRule()
    {
      return priterator.getWindingRule();
    }
    
    public boolean isDone()
    {
      return priterator.isDone();
    }
    
    public void next()
    {
      priterator.next();
    }
  }
  
  private static class AdaptorShape
    implements java.awt.Shape
  {
    private com.sun.javafx.geom.Shape prshape;
    private static J2DPrismGraphics.AdaptorPathIterator tmpAdaptor = new J2DPrismGraphics.AdaptorPathIterator(null);
    
    public void setShape(com.sun.javafx.geom.Shape paramShape)
    {
      prshape = paramShape;
    }
    
    public boolean contains(double paramDouble1, double paramDouble2)
    {
      return prshape.contains((float)paramDouble1, (float)paramDouble2);
    }
    
    public boolean contains(Point2D paramPoint2D)
    {
      return contains(paramPoint2D.getX(), paramPoint2D.getY());
    }
    
    public boolean contains(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4)
    {
      return prshape.contains((float)paramDouble1, (float)paramDouble2, (float)paramDouble3, (float)paramDouble4);
    }
    
    public boolean contains(Rectangle2D paramRectangle2D)
    {
      return contains(paramRectangle2D.getX(), paramRectangle2D.getY(), paramRectangle2D.getWidth(), paramRectangle2D.getHeight());
    }
    
    public boolean intersects(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4)
    {
      return prshape.intersects((float)paramDouble1, (float)paramDouble2, (float)paramDouble3, (float)paramDouble4);
    }
    
    public boolean intersects(Rectangle2D paramRectangle2D)
    {
      return intersects(paramRectangle2D.getX(), paramRectangle2D.getY(), paramRectangle2D.getWidth(), paramRectangle2D.getHeight());
    }
    
    public java.awt.Rectangle getBounds()
    {
      return getBounds2D().getBounds();
    }
    
    public Rectangle2D getBounds2D()
    {
      RectBounds localRectBounds = prshape.getBounds();
      Rectangle2D.Float localFloat = new Rectangle2D.Float();
      localFloat.setFrameFromDiagonal(localRectBounds.getMinX(), localRectBounds.getMinY(), localRectBounds.getMaxX(), localRectBounds.getMaxY());
      return localFloat;
    }
    
    private static java.awt.geom.PathIterator tmpAdaptor(com.sun.javafx.geom.PathIterator paramPathIterator)
    {
      tmpAdaptor.setIterator(paramPathIterator);
      return tmpAdaptor;
    }
    
    public java.awt.geom.PathIterator getPathIterator(AffineTransform paramAffineTransform)
    {
      BaseTransform localBaseTransform = paramAffineTransform == null ? null : J2DPrismGraphics.toPrTransform(paramAffineTransform);
      return tmpAdaptor(prshape.getPathIterator(localBaseTransform));
    }
    
    public java.awt.geom.PathIterator getPathIterator(AffineTransform paramAffineTransform, double paramDouble)
    {
      BaseTransform localBaseTransform = paramAffineTransform == null ? null : J2DPrismGraphics.toPrTransform(paramAffineTransform);
      return tmpAdaptor(prshape.getPathIterator(localBaseTransform, (float)paramDouble));
    }
  }
  
  static abstract class FilterStroke
    implements Stroke
  {
    protected java.awt.BasicStroke stroke;
    static final double CtrlVal = 0.5522847498307933D;
    
    FilterStroke(java.awt.BasicStroke paramBasicStroke)
    {
      stroke = paramBasicStroke;
    }
    
    protected abstract java.awt.Shape makeStrokedRect(Rectangle2D paramRectangle2D);
    
    protected abstract java.awt.Shape makeStrokedShape(java.awt.Shape paramShape);
    
    public java.awt.Shape createStrokedShape(java.awt.Shape paramShape)
    {
      if ((paramShape instanceof Rectangle2D))
      {
        java.awt.Shape localShape = makeStrokedRect((Rectangle2D)paramShape);
        if (localShape != null) {
          return localShape;
        }
      }
      return makeStrokedShape(paramShape);
    }
    
    static Point2D cornerArc(GeneralPath paramGeneralPath, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6)
    {
      return cornerArc(paramGeneralPath, paramFloat1, paramFloat2, paramFloat3, paramFloat4, paramFloat5, paramFloat6, 0.5F);
    }
    
    static Point2D cornerArc(GeneralPath paramGeneralPath, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6, float paramFloat7)
    {
      float f1 = (float)(paramFloat1 + 0.5522847498307933D * (paramFloat3 - paramFloat1));
      float f2 = (float)(paramFloat2 + 0.5522847498307933D * (paramFloat4 - paramFloat2));
      float f3 = (float)(paramFloat5 + 0.5522847498307933D * (paramFloat3 - paramFloat5));
      float f4 = (float)(paramFloat6 + 0.5522847498307933D * (paramFloat4 - paramFloat6));
      paramGeneralPath.curveTo(f1, f2, f3, f4, paramFloat5, paramFloat6);
      return new Point2D.Float(eval(paramFloat1, f1, f3, paramFloat5, paramFloat7), eval(paramFloat2, f2, f4, paramFloat6, paramFloat7));
    }
    
    static float eval(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5)
    {
      paramFloat1 += (paramFloat2 - paramFloat1) * paramFloat5;
      paramFloat2 += (paramFloat3 - paramFloat2) * paramFloat5;
      paramFloat3 += (paramFloat4 - paramFloat3) * paramFloat5;
      paramFloat1 += (paramFloat2 - paramFloat1) * paramFloat5;
      paramFloat2 += (paramFloat3 - paramFloat2) * paramFloat5;
      return paramFloat1 + (paramFloat2 - paramFloat1) * paramFloat5;
    }
  }
  
  static class InnerStroke
    extends J2DPrismGraphics.FilterStroke
  {
    InnerStroke(java.awt.BasicStroke paramBasicStroke)
    {
      super();
    }
    
    protected java.awt.Shape makeStrokedRect(Rectangle2D paramRectangle2D)
    {
      if (stroke.getDashArray() != null) {
        return null;
      }
      float f1 = stroke.getLineWidth() / 2.0F;
      if ((f1 >= paramRectangle2D.getWidth()) || (f1 >= paramRectangle2D.getHeight())) {
        return paramRectangle2D;
      }
      float f2 = (float)paramRectangle2D.getX();
      float f3 = (float)paramRectangle2D.getY();
      float f4 = f2 + (float)paramRectangle2D.getWidth();
      float f5 = f3 + (float)paramRectangle2D.getHeight();
      GeneralPath localGeneralPath = new GeneralPath();
      localGeneralPath.moveTo(f2, f3);
      localGeneralPath.lineTo(f4, f3);
      localGeneralPath.lineTo(f4, f5);
      localGeneralPath.lineTo(f2, f5);
      localGeneralPath.closePath();
      f2 += f1;
      f3 += f1;
      f4 -= f1;
      f5 -= f1;
      localGeneralPath.moveTo(f2, f3);
      localGeneralPath.lineTo(f2, f5);
      localGeneralPath.lineTo(f4, f5);
      localGeneralPath.lineTo(f4, f3);
      localGeneralPath.closePath();
      return localGeneralPath;
    }
    
    protected java.awt.Shape makeStrokedEllipse(Ellipse2D paramEllipse2D)
    {
      if (stroke.getDashArray() != null) {
        return null;
      }
      float f1 = stroke.getLineWidth() / 2.0F;
      float f2 = (float)paramEllipse2D.getWidth();
      float f3 = (float)paramEllipse2D.getHeight();
      if ((f2 - 2.0F * f1 > f3 * 2.0F) || (f3 - 2.0F * f1 > f2 * 2.0F)) {
        return null;
      }
      if ((f1 >= f2) || (f1 >= f3)) {
        return paramEllipse2D;
      }
      float f4 = (float)paramEllipse2D.getX();
      float f5 = (float)paramEllipse2D.getY();
      float f6 = f4 + f2 / 2.0F;
      float f7 = f5 + f3 / 2.0F;
      float f8 = f4 + f2;
      float f9 = f5 + f3;
      GeneralPath localGeneralPath = new GeneralPath();
      localGeneralPath.moveTo(f6, f5);
      cornerArc(localGeneralPath, f6, f5, f8, f5, f8, f7);
      cornerArc(localGeneralPath, f8, f7, f8, f9, f6, f9);
      cornerArc(localGeneralPath, f6, f9, f4, f9, f4, f7);
      cornerArc(localGeneralPath, f4, f7, f4, f5, f6, f5);
      localGeneralPath.closePath();
      f4 += f1;
      f5 += f1;
      f8 -= f1;
      f9 -= f1;
      localGeneralPath.moveTo(f6, f5);
      cornerArc(localGeneralPath, f6, f5, f4, f5, f4, f7);
      cornerArc(localGeneralPath, f4, f7, f4, f9, f6, f9);
      cornerArc(localGeneralPath, f6, f9, f8, f9, f8, f7);
      cornerArc(localGeneralPath, f8, f7, f8, f5, f6, f5);
      localGeneralPath.closePath();
      return localGeneralPath;
    }
    
    protected java.awt.Shape makeStrokedShape(java.awt.Shape paramShape)
    {
      java.awt.Shape localShape = stroke.createStrokedShape(paramShape);
      Area localArea = new Area(localShape);
      localArea.intersect(new Area(paramShape));
      return localArea;
    }
  }
  
  static class OuterStroke
    extends J2DPrismGraphics.FilterStroke
  {
    static double SQRT_2 = Math.sqrt(2.0D);
    
    OuterStroke(java.awt.BasicStroke paramBasicStroke)
    {
      super();
    }
    
    protected java.awt.Shape makeStrokedRect(Rectangle2D paramRectangle2D)
    {
      if (stroke.getDashArray() != null) {
        return null;
      }
      float f1 = stroke.getLineWidth() / 2.0F;
      float f2 = (float)paramRectangle2D.getX();
      float f3 = (float)paramRectangle2D.getY();
      float f4 = f2 + (float)paramRectangle2D.getWidth();
      float f5 = f3 + (float)paramRectangle2D.getHeight();
      GeneralPath localGeneralPath = new GeneralPath();
      localGeneralPath.moveTo(f2, f3);
      localGeneralPath.lineTo(f4, f3);
      localGeneralPath.lineTo(f4, f5);
      localGeneralPath.lineTo(f2, f5);
      localGeneralPath.closePath();
      float f6 = f2 - f1;
      float f7 = f3 - f1;
      float f8 = f4 + f1;
      float f9 = f5 + f1;
      switch (stroke.getLineJoin())
      {
      case 0: 
        if (stroke.getMiterLimit() >= SQRT_2)
        {
          localGeneralPath.moveTo(f6, f7);
          localGeneralPath.lineTo(f6, f9);
          localGeneralPath.lineTo(f8, f9);
          localGeneralPath.lineTo(f8, f7);
          localGeneralPath.closePath();
        }
        break;
      case 2: 
        localGeneralPath.moveTo(f6, f3);
        localGeneralPath.lineTo(f6, f5);
        localGeneralPath.lineTo(f2, f9);
        localGeneralPath.lineTo(f4, f9);
        localGeneralPath.lineTo(f8, f5);
        localGeneralPath.lineTo(f8, f3);
        localGeneralPath.lineTo(f4, f7);
        localGeneralPath.lineTo(f2, f7);
        localGeneralPath.closePath();
        break;
      case 1: 
        localGeneralPath.moveTo(f6, f3);
        localGeneralPath.lineTo(f6, f5);
        cornerArc(localGeneralPath, f6, f5, f6, f9, f2, f9);
        localGeneralPath.lineTo(f4, f9);
        cornerArc(localGeneralPath, f4, f9, f8, f9, f8, f5);
        localGeneralPath.lineTo(f8, f3);
        cornerArc(localGeneralPath, f8, f3, f8, f7, f4, f7);
        localGeneralPath.lineTo(f2, f7);
        cornerArc(localGeneralPath, f2, f7, f6, f7, f6, f3);
        localGeneralPath.closePath();
        break;
      }
      throw new InternalError("Unrecognized line join style");
      return localGeneralPath;
    }
    
    protected java.awt.Shape makeStrokedEllipse(Ellipse2D paramEllipse2D)
    {
      if (stroke.getDashArray() != null) {
        return null;
      }
      float f1 = stroke.getLineWidth() / 2.0F;
      float f2 = (float)paramEllipse2D.getWidth();
      float f3 = (float)paramEllipse2D.getHeight();
      if ((f2 > f3 * 2.0F) || (f3 > f2 * 2.0F)) {
        return null;
      }
      float f4 = (float)paramEllipse2D.getX();
      float f5 = (float)paramEllipse2D.getY();
      float f6 = f4 + f2 / 2.0F;
      float f7 = f5 + f3 / 2.0F;
      float f8 = f4 + f2;
      float f9 = f5 + f3;
      GeneralPath localGeneralPath = new GeneralPath();
      localGeneralPath.moveTo(f6, f5);
      cornerArc(localGeneralPath, f6, f5, f8, f5, f8, f7);
   
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