Package com.sun.media.jai.util

Examples of com.sun.media.jai.util.Rational


        // Represent the scale factors as Rational numbers.
        // Since a value of 1.2 is represented as 1.200001 which
        // throws the forward/backward mapping in certain situations.
  // Convert the scale and translation factors to Rational numbers
        Rational scaleXRational =
      Rational.approximate(scaleX, rationalTolerance);

        Rational scaleYRational =
      Rational.approximate(scaleY, rationalTolerance);

  long scaleXRationalNum = (long)scaleXRational.num;
  long scaleXRationalDenom = (long)scaleXRational.denom;
  long scaleYRationalNum = (long)scaleYRational.num;
  long scaleYRationalDenom = (long)scaleYRational.denom;

        Rational transXRational =
      Rational.approximate(transX, rationalTolerance);

        Rational transYRational =
      Rational.approximate(transY, rationalTolerance);

  long transXRationalNum = (long)transXRational.num;
  long transXRationalDenom = (long)transXRational.denom;
  long transYRationalNum = (long)transYRational.num;
View Full Code Here


  this.transXRationalDenom = (long)this.transXRational.denom;
  this.transYRationalNum = (long)this.transYRational.num;
  this.transYRationalDenom = (long)this.transYRational.denom;

  // Inverse scale factors as Rationals
  invScaleXRational = new Rational(scaleXRational);
  invScaleXRational.invert();
  invScaleYRational = new Rational(scaleYRational);
  invScaleYRational.invert();
  invScaleXRationalNum = invScaleXRational.num;
  invScaleXRationalDenom = invScaleXRational.denom;
  invScaleYRationalNum = invScaleYRational.num;
  invScaleYRationalDenom = invScaleYRational.denom;
View Full Code Here

/*      */   private int tpad;
/*      */   private int bpad;
/*      */
/*      */   private static ImageLayout layoutHelper(RenderedImage source, float scaleX, float scaleY, float transX, float transY, Interpolation interp, ImageLayout il)
/*      */   {
/*  228 */     Rational scaleXRational = Rational.approximate(scaleX, rationalTolerance);
/*      */
/*  231 */     Rational scaleYRational = Rational.approximate(scaleY, rationalTolerance);
/*      */
/*  234 */     long scaleXRationalNum = scaleXRational.num;
/*  235 */     long scaleXRationalDenom = scaleXRational.denom;
/*  236 */     long scaleYRationalNum = scaleYRational.num;
/*  237 */     long scaleYRationalDenom = scaleYRational.denom;
/*      */
/*  239 */     Rational transXRational = Rational.approximate(transX, rationalTolerance);
/*      */
/*  242 */     Rational transYRational = Rational.approximate(transY, rationalTolerance);
/*      */
/*  245 */     long transXRationalNum = transXRational.num;
/*  246 */     long transXRationalDenom = transXRational.denom;
/*  247 */     long transYRationalNum = transYRational.num;
/*  248 */     long transYRationalDenom = transYRational.denom;
View Full Code Here

/*  466 */     this.transXRationalNum = this.transXRational.num;
/*  467 */     this.transXRationalDenom = this.transXRational.denom;
/*  468 */     this.transYRationalNum = this.transYRational.num;
/*  469 */     this.transYRationalDenom = this.transYRational.denom;
/*      */
/*  472 */     this.invScaleXRational = new Rational(this.scaleXRational);
/*  473 */     this.invScaleXRational.invert();
/*  474 */     this.invScaleYRational = new Rational(this.scaleYRational);
/*  475 */     this.invScaleYRational.invert();
/*  476 */     this.invScaleXRationalNum = this.invScaleXRational.num;
/*  477 */     this.invScaleXRationalDenom = this.invScaleXRational.denom;
/*  478 */     this.invScaleYRationalNum = this.invScaleYRational.num;
/*  479 */     this.invScaleYRationalDenom = this.invScaleYRational.denom;
View Full Code Here

   
    // Represent the scale factors as Rational numbers.
      // Since a value of 1.2 is represented as 1.200001 which
      // throws the forward/backward mapping in certain situations.
      // Convert the scale and translation factors to Rational numbers
      Rational scaleXRational = Rational.approximate(scaleX,RATIONAL_TOLERANCE);
      Rational scaleYRational = Rational.approximate(scaleY,RATIONAL_TOLERANCE);
   
      long scaleXRationalNum = scaleXRational.num;
      long scaleXRationalDenom = scaleXRational.denom;
      long scaleYRationalNum = scaleYRational.num;
      long scaleYRationalDenom = scaleYRational.denom;
   
      Rational transXRational = Rational.approximate(transX,RATIONAL_TOLERANCE);
      Rational transYRational = Rational.approximate(transY,RATIONAL_TOLERANCE);
   
      long transXRationalNum = transXRational.num;
      long transXRationalDenom = transXRational.denom;
      long transYRationalNum = transYRational.num;
      long transYRationalDenom = transYRational.denom;
View Full Code Here

   
    // Represent the scale factors as Rational numbers.
            // Since a value of 1.2 is represented as 1.200001 which
            // throws the forward/backward mapping in certain situations.
            // Convert the scale and translation factors to Rational numbers
            Rational scaleXRational = Rational.approximate(scaleX,RATIONAL_TOLERANCE);
            Rational scaleYRational = Rational.approximate(scaleY,RATIONAL_TOLERANCE);
   
            long scaleXRationalNum = (long) scaleXRational.num;
            long scaleXRationalDenom = (long) scaleXRational.denom;
            long scaleYRationalNum = (long) scaleYRational.num;
            long scaleYRationalDenom = (long) scaleYRational.denom;
   
            Rational transXRational = Rational.approximate(transX,RATIONAL_TOLERANCE);
            Rational transYRational = Rational.approximate(transY,RATIONAL_TOLERANCE);
   
            long transXRationalNum = (long) transXRational.num;
            long transXRationalDenom = (long) transXRational.denom;
            long transYRationalNum = (long) transYRational.num;
            long transYRationalDenom = (long) transYRational.denom;
View Full Code Here

TOP

Related Classes of com.sun.media.jai.util.Rational

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.