Java Code Examples for java.awt.geom.AffineTransform#TYPE_GENERAL_ROTATION

The following examples show how to use java.awt.geom.AffineTransform#TYPE_GENERAL_ROTATION . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
@Override
protected void deviceFillRect(int x, int y, int width, int height,
                              Color color) {
    /*
     * Transform to device coordinates
     */
    AffineTransform deviceTransform = getTransform();

    /* check if rotated or sheared */
    int transformType = deviceTransform.getType();
    boolean usePath =  ((transformType &
                           (AffineTransform.TYPE_GENERAL_ROTATION |
                            AffineTransform.TYPE_GENERAL_TRANSFORM)) != 0);
    if (usePath) {
        fill(new Rectangle2D.Float(x, y, width, height));
        return;
    }

    Point2D.Float tlc_pos = new Point2D.Float(x, y);
    deviceTransform.transform(tlc_pos, tlc_pos);

    Point2D.Float brc_pos = new Point2D.Float(x+width, y+height);
    deviceTransform.transform(brc_pos, brc_pos);

    float deviceWidth = (float) (brc_pos.getX() - tlc_pos.getX());
    float deviceHeight = (float)(brc_pos.getY() - tlc_pos.getY());

    WPrinterJob wPrinterJob = (WPrinterJob) getPrinterJob();
    wPrinterJob.fillRect((float)tlc_pos.getX(), (float)tlc_pos.getY(),
                         deviceWidth, deviceHeight, color);
}
 
Example 2
@Override
protected void deviceFillRect(int x, int y, int width, int height,
                              Color color) {
    /*
     * Transform to device coordinates
     */
    AffineTransform deviceTransform = getTransform();

    /* check if rotated or sheared */
    int transformType = deviceTransform.getType();
    boolean usePath =  ((transformType &
                           (AffineTransform.TYPE_GENERAL_ROTATION |
                            AffineTransform.TYPE_GENERAL_TRANSFORM)) != 0);
    if (usePath) {
        fill(new Rectangle2D.Float(x, y, width, height));
        return;
    }

    Point2D.Float tlc_pos = new Point2D.Float(x, y);
    deviceTransform.transform(tlc_pos, tlc_pos);

    Point2D.Float brc_pos = new Point2D.Float(x+width, y+height);
    deviceTransform.transform(brc_pos, brc_pos);

    float deviceWidth = (float) (brc_pos.getX() - tlc_pos.getX());
    float deviceHeight = (float)(brc_pos.getY() - tlc_pos.getY());

    WPrinterJob wPrinterJob = (WPrinterJob) getPrinterJob();
    wPrinterJob.fillRect((float)tlc_pos.getX(), (float)tlc_pos.getY(),
                         deviceWidth, deviceHeight, color);
}
 
Example 3
protected void deviceFillRect(int x, int y, int width, int height,
                              Color color) {
    /*
     * Transform to device coordinates
     */
    AffineTransform deviceTransform = getTransform();

    /* check if rotated or sheared */
    int transformType = deviceTransform.getType();
    boolean usePath =  ((transformType &
                           (AffineTransform.TYPE_GENERAL_ROTATION |
                            AffineTransform.TYPE_GENERAL_TRANSFORM)) != 0);
    if (usePath) {
        fill(new Rectangle2D.Float(x, y, width, height));
        return;
    }

    Point2D.Float tlc_pos = new Point2D.Float(x, y);
    deviceTransform.transform(tlc_pos, tlc_pos);

    Point2D.Float brc_pos = new Point2D.Float(x+width, y+height);
    deviceTransform.transform(brc_pos, brc_pos);

    float deviceWidth = (float) (brc_pos.getX() - tlc_pos.getX());
    float deviceHeight = (float)(brc_pos.getY() - tlc_pos.getY());

    WPrinterJob wPrinterJob = (WPrinterJob) getPrinterJob();
    wPrinterJob.fillRect((float)tlc_pos.getX(), (float)tlc_pos.getY(),
                         deviceWidth, deviceHeight, color);
}
 
Example 4
/**
 * Return true if drawing <code>img</code> will
 * invoke a Java2D bug (#4258675). The bug in question
 * occurs when a draw image call with a background color
 * parameter tries to render a sheared
 * or rotated image. The portions of the bounding
 * rectangle not covered by the sheared image
 * are incorrectly drawn with the background color.
 */
private boolean needToCopyBgColorImage(Image img) {

    boolean needToCopy;

    AffineTransform transform = getTransform();

    return (transform.getType()
            & (AffineTransform.TYPE_GENERAL_ROTATION
               | AffineTransform.TYPE_GENERAL_TRANSFORM)) != 0;
}
 
Example 5
/**
 * Return true if drawing <code>img</code> will
 * invoke a Java2D bug (#4258675). The bug in question
 * occurs when a draw image call with a background color
 * parameter tries to render a sheared
 * or rotated image. The portions of the bounding
 * rectangle not covered by the sheared image
 * are incorrectly drawn with the background color.
 */
private boolean needToCopyBgColorImage(Image img) {

    boolean needToCopy;

    AffineTransform transform = getTransform();

    return (transform.getType()
            & (AffineTransform.TYPE_GENERAL_ROTATION
               | AffineTransform.TYPE_GENERAL_TRANSFORM)) != 0;
}
 
Example 6
@Override
protected void deviceFillRect(int x, int y, int width, int height,
                              Color color) {
    /*
     * Transform to device coordinates
     */
    AffineTransform deviceTransform = getTransform();

    /* check if rotated or sheared */
    int transformType = deviceTransform.getType();
    boolean usePath =  ((transformType &
                           (AffineTransform.TYPE_GENERAL_ROTATION |
                            AffineTransform.TYPE_GENERAL_TRANSFORM)) != 0);
    if (usePath) {
        fill(new Rectangle2D.Float(x, y, width, height));
        return;
    }

    Point2D.Float tlc_pos = new Point2D.Float(x, y);
    deviceTransform.transform(tlc_pos, tlc_pos);

    Point2D.Float brc_pos = new Point2D.Float(x+width, y+height);
    deviceTransform.transform(brc_pos, brc_pos);

    float deviceWidth = (float) (brc_pos.getX() - tlc_pos.getX());
    float deviceHeight = (float)(brc_pos.getY() - tlc_pos.getY());

    WPrinterJob wPrinterJob = (WPrinterJob) getPrinterJob();
    wPrinterJob.fillRect((float)tlc_pos.getX(), (float)tlc_pos.getY(),
                         deviceWidth, deviceHeight, color);
}
 
Example 7
@Override
protected void deviceFillRect(int x, int y, int width, int height,
                              Color color) {
    /*
     * Transform to device coordinates
     */
    AffineTransform deviceTransform = getTransform();

    /* check if rotated or sheared */
    int transformType = deviceTransform.getType();
    boolean usePath =  ((transformType &
                           (AffineTransform.TYPE_GENERAL_ROTATION |
                            AffineTransform.TYPE_GENERAL_TRANSFORM)) != 0);
    if (usePath) {
        fill(new Rectangle2D.Float(x, y, width, height));
        return;
    }

    Point2D.Float tlc_pos = new Point2D.Float(x, y);
    deviceTransform.transform(tlc_pos, tlc_pos);

    Point2D.Float brc_pos = new Point2D.Float(x+width, y+height);
    deviceTransform.transform(brc_pos, brc_pos);

    float deviceWidth = (float) (brc_pos.getX() - tlc_pos.getX());
    float deviceHeight = (float)(brc_pos.getY() - tlc_pos.getY());

    WPrinterJob wPrinterJob = (WPrinterJob) getPrinterJob();
    wPrinterJob.fillRect((float)tlc_pos.getX(), (float)tlc_pos.getY(),
                         deviceWidth, deviceHeight, color);
}
 
Example 8
/**
 * Return true if drawing <code>img</code> will
 * invoke a Java2D bug (#4258675). The bug in question
 * occurs when a draw image call with a background color
 * parameter tries to render a sheared
 * or rotated image. The portions of the bounding
 * rectangle not covered by the sheared image
 * are incorrectly drawn with the background color.
 */
private boolean needToCopyBgColorImage(Image img) {

    boolean needToCopy;

    AffineTransform transform = getTransform();

    return (transform.getType()
            & (AffineTransform.TYPE_GENERAL_ROTATION
               | AffineTransform.TYPE_GENERAL_TRANSFORM)) != 0;
}
 
Example 9
@Override
protected void deviceFillRect(int x, int y, int width, int height,
                              Color color) {
    /*
     * Transform to device coordinates
     */
    AffineTransform deviceTransform = getTransform();

    /* check if rotated or sheared */
    int transformType = deviceTransform.getType();
    boolean usePath =  ((transformType &
                           (AffineTransform.TYPE_GENERAL_ROTATION |
                            AffineTransform.TYPE_GENERAL_TRANSFORM)) != 0);
    if (usePath) {
        fill(new Rectangle2D.Float(x, y, width, height));
        return;
    }

    Point2D.Float tlc_pos = new Point2D.Float(x, y);
    deviceTransform.transform(tlc_pos, tlc_pos);

    Point2D.Float brc_pos = new Point2D.Float(x+width, y+height);
    deviceTransform.transform(brc_pos, brc_pos);

    float deviceWidth = (float) (brc_pos.getX() - tlc_pos.getX());
    float deviceHeight = (float)(brc_pos.getY() - tlc_pos.getY());

    WPrinterJob wPrinterJob = (WPrinterJob) getPrinterJob();
    wPrinterJob.fillRect((float)tlc_pos.getX(), (float)tlc_pos.getY(),
                         deviceWidth, deviceHeight, color);
}
 
Example 10
/**
 * Return true if drawing <code>img</code> will
 * invoke a Java2D bug (#4258675). The bug in question
 * occurs when a draw image call with a background color
 * parameter tries to render a sheared
 * or rotated image. The portions of the bounding
 * rectangle not covered by the sheared image
 * are incorrectly drawn with the background color.
 */
private boolean needToCopyBgColorImage(Image img) {

    boolean needToCopy;

    AffineTransform transform = getTransform();

    return (transform.getType()
            & (AffineTransform.TYPE_GENERAL_ROTATION
               | AffineTransform.TYPE_GENERAL_TRANSFORM)) != 0;
}
 
Example 11
Source Project: Bytecoder   File: ProxyGraphics2D.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Return true if drawing {@code img} will
 * invoke a Java2D bug (#4258675). The bug in question
 * occurs when a draw image call with a background color
 * parameter tries to render a sheared
 * or rotated image. The portions of the bounding
 * rectangle not covered by the sheared image
 * are incorrectly drawn with the background color.
 */
private boolean needToCopyBgColorImage(Image img) {

    boolean needToCopy;

    AffineTransform transform = getTransform();

    return (transform.getType()
            & (AffineTransform.TYPE_GENERAL_ROTATION
               | AffineTransform.TYPE_GENERAL_TRANSFORM)) != 0;
}
 
Example 12
/**
 * Return true if drawing <code>img</code> will
 * invoke a Java2D bug (#4258675). The bug in question
 * occurs when a draw image call with a background color
 * parameter tries to render a sheared
 * or rotated image. The portions of the bounding
 * rectangle not covered by the sheared image
 * are incorrectly drawn with the background color.
 */
private boolean needToCopyBgColorImage(Image img) {

    boolean needToCopy;

    AffineTransform transform = getTransform();

    return (transform.getType()
            & (AffineTransform.TYPE_GENERAL_ROTATION
               | AffineTransform.TYPE_GENERAL_TRANSFORM)) != 0;
}
 
Example 13
@Override
protected void deviceFillRect(int x, int y, int width, int height,
                              Color color) {
    /*
     * Transform to device coordinates
     */
    AffineTransform deviceTransform = getTransform();

    /* check if rotated or sheared */
    int transformType = deviceTransform.getType();
    boolean usePath =  ((transformType &
                           (AffineTransform.TYPE_GENERAL_ROTATION |
                            AffineTransform.TYPE_GENERAL_TRANSFORM)) != 0);
    if (usePath) {
        fill(new Rectangle2D.Float(x, y, width, height));
        return;
    }

    Point2D.Float tlc_pos = new Point2D.Float(x, y);
    deviceTransform.transform(tlc_pos, tlc_pos);

    Point2D.Float brc_pos = new Point2D.Float(x+width, y+height);
    deviceTransform.transform(brc_pos, brc_pos);

    float deviceWidth = (float) (brc_pos.getX() - tlc_pos.getX());
    float deviceHeight = (float)(brc_pos.getY() - tlc_pos.getY());

    WPrinterJob wPrinterJob = (WPrinterJob) getPrinterJob();
    wPrinterJob.fillRect((float)tlc_pos.getX(), (float)tlc_pos.getY(),
                         deviceWidth, deviceHeight, color);
}
 
Example 14
/**
* Draw the bounding rectangle using transformed coordinates.
*/
@Override
protected void deviceFrameRect(int x, int y, int width, int height,
                                Color color) {

   AffineTransform deviceTransform = getTransform();

   /* check if rotated or sheared */
   int transformType = deviceTransform.getType();
   boolean usePath = ((transformType &
                      (AffineTransform.TYPE_GENERAL_ROTATION |
                       AffineTransform.TYPE_GENERAL_TRANSFORM)) != 0);

   if (usePath) {
       draw(new Rectangle2D.Float(x, y, width, height));
       return;
   }

   Stroke stroke = getStroke();

   if (stroke instanceof BasicStroke) {
       BasicStroke lineStroke = (BasicStroke) stroke;

       int endCap = lineStroke.getEndCap();
       int lineJoin = lineStroke.getLineJoin();


       /* check for default style and try to optimize it by
        * calling the frameRect native function instead of using paths.
        */
       if ((endCap == BasicStroke.CAP_SQUARE) &&
           (lineJoin == BasicStroke.JOIN_MITER) &&
           (lineStroke.getMiterLimit() ==10.0f)) {

           float lineWidth = lineStroke.getLineWidth();
           Point2D.Float penSize = new Point2D.Float(lineWidth,
                                                     lineWidth);

           deviceTransform.deltaTransform(penSize, penSize);
           float deviceLineWidth = Math.min(Math.abs(penSize.x),
                                            Math.abs(penSize.y));

           /* transform upper left coordinate */
           Point2D.Float ul_pos = new Point2D.Float(x, y);
           deviceTransform.transform(ul_pos, ul_pos);

           /* transform lower right coordinate */
           Point2D.Float lr_pos = new Point2D.Float(x + width,
                                                    y + height);
           deviceTransform.transform(lr_pos, lr_pos);

           float w = (float) (lr_pos.getX() - ul_pos.getX());
           float h = (float)(lr_pos.getY() - ul_pos.getY());

           WPrinterJob wPrinterJob = (WPrinterJob) getPrinterJob();

           /* use selectStylePen, if supported */
           if (wPrinterJob.selectStylePen(endCap, lineJoin,
                                      deviceLineWidth, color) == true)  {
               wPrinterJob.frameRect((float)ul_pos.getX(),
                                     (float)ul_pos.getY(), w, h);
           }
           /* not supported, must be a Win 9x */
           else {

               double lowerRes = Math.min(wPrinterJob.getXRes(),
                                          wPrinterJob.getYRes());

               if ((deviceLineWidth/lowerRes) < MAX_THINLINE_INCHES) {
                   /* use the default pen styles for thin pens. */
                   wPrinterJob.selectPen(deviceLineWidth, color);
                   wPrinterJob.frameRect((float)ul_pos.getX(),
                                         (float)ul_pos.getY(), w, h);
               }
               else {
                   draw(new Rectangle2D.Float(x, y, width, height));
               }
           }
       }
       else {
           draw(new Rectangle2D.Float(x, y, width, height));
       }
   }
}
 
Example 15
/**
* Draw the bounding rectangle using transformed coordinates.
*/
@Override
protected void deviceFrameRect(int x, int y, int width, int height,
                                Color color) {

   AffineTransform deviceTransform = getTransform();

   /* check if rotated or sheared */
   int transformType = deviceTransform.getType();
   boolean usePath = ((transformType &
                      (AffineTransform.TYPE_GENERAL_ROTATION |
                       AffineTransform.TYPE_GENERAL_TRANSFORM)) != 0);

   if (usePath) {
       draw(new Rectangle2D.Float(x, y, width, height));
       return;
   }

   Stroke stroke = getStroke();

   if (stroke instanceof BasicStroke) {
       BasicStroke lineStroke = (BasicStroke) stroke;

       int endCap = lineStroke.getEndCap();
       int lineJoin = lineStroke.getLineJoin();


       /* check for default style and try to optimize it by
        * calling the frameRect native function instead of using paths.
        */
       if ((endCap == BasicStroke.CAP_SQUARE) &&
           (lineJoin == BasicStroke.JOIN_MITER) &&
           (lineStroke.getMiterLimit() ==10.0f)) {

           float lineWidth = lineStroke.getLineWidth();
           Point2D.Float penSize = new Point2D.Float(lineWidth,
                                                     lineWidth);

           deviceTransform.deltaTransform(penSize, penSize);
           float deviceLineWidth = Math.min(Math.abs(penSize.x),
                                            Math.abs(penSize.y));

           /* transform upper left coordinate */
           Point2D.Float ul_pos = new Point2D.Float(x, y);
           deviceTransform.transform(ul_pos, ul_pos);

           /* transform lower right coordinate */
           Point2D.Float lr_pos = new Point2D.Float(x + width,
                                                    y + height);
           deviceTransform.transform(lr_pos, lr_pos);

           float w = (float) (lr_pos.getX() - ul_pos.getX());
           float h = (float)(lr_pos.getY() - ul_pos.getY());

           WPrinterJob wPrinterJob = (WPrinterJob) getPrinterJob();

           /* use selectStylePen, if supported */
           if (wPrinterJob.selectStylePen(endCap, lineJoin,
                                      deviceLineWidth, color) == true)  {
               wPrinterJob.frameRect((float)ul_pos.getX(),
                                     (float)ul_pos.getY(), w, h);
           }
           /* not supported, must be a Win 9x */
           else {

               double lowerRes = Math.min(wPrinterJob.getXRes(),
                                          wPrinterJob.getYRes());

               if ((deviceLineWidth/lowerRes) < MAX_THINLINE_INCHES) {
                   /* use the default pen styles for thin pens. */
                   wPrinterJob.selectPen(deviceLineWidth, color);
                   wPrinterJob.frameRect((float)ul_pos.getX(),
                                         (float)ul_pos.getY(), w, h);
               }
               else {
                   draw(new Rectangle2D.Float(x, y, width, height));
               }
           }
       }
       else {
           draw(new Rectangle2D.Float(x, y, width, height));
       }
   }
}
 
Example 16
public static boolean isTransformQuadrantRotated(AffineTransform tr) {
    return ((tr.getType() & (AffineTransform.TYPE_GENERAL_ROTATION |
             AffineTransform.TYPE_GENERAL_TRANSFORM)) == 0);
}
 
Example 17
/**
* Draw the bounding rectangle using transformed coordinates.
*/
protected void deviceFrameRect(int x, int y, int width, int height,
                                Color color) {

   AffineTransform deviceTransform = getTransform();

   /* check if rotated or sheared */
   int transformType = deviceTransform.getType();
   boolean usePath = ((transformType &
                      (AffineTransform.TYPE_GENERAL_ROTATION |
                       AffineTransform.TYPE_GENERAL_TRANSFORM)) != 0);

   if (usePath) {
       draw(new Rectangle2D.Float(x, y, width, height));
       return;
   }

   Stroke stroke = getStroke();

   if (stroke instanceof BasicStroke) {
       BasicStroke lineStroke = (BasicStroke) stroke;

       int endCap = lineStroke.getEndCap();
       int lineJoin = lineStroke.getLineJoin();


       /* check for default style and try to optimize it by
        * calling the frameRect native function instead of using paths.
        */
       if ((endCap == BasicStroke.CAP_SQUARE) &&
           (lineJoin == BasicStroke.JOIN_MITER) &&
           (lineStroke.getMiterLimit() ==10.0f)) {

           float lineWidth = lineStroke.getLineWidth();
           Point2D.Float penSize = new Point2D.Float(lineWidth,
                                                     lineWidth);

           deviceTransform.deltaTransform(penSize, penSize);
           float deviceLineWidth = Math.min(Math.abs(penSize.x),
                                            Math.abs(penSize.y));

           /* transform upper left coordinate */
           Point2D.Float ul_pos = new Point2D.Float(x, y);
           deviceTransform.transform(ul_pos, ul_pos);

           /* transform lower right coordinate */
           Point2D.Float lr_pos = new Point2D.Float(x + width,
                                                    y + height);
           deviceTransform.transform(lr_pos, lr_pos);

           float w = (float) (lr_pos.getX() - ul_pos.getX());
           float h = (float)(lr_pos.getY() - ul_pos.getY());

           WPrinterJob wPrinterJob = (WPrinterJob) getPrinterJob();

           /* use selectStylePen, if supported */
           if (wPrinterJob.selectStylePen(endCap, lineJoin,
                                      deviceLineWidth, color) == true)  {
               wPrinterJob.frameRect((float)ul_pos.getX(),
                                     (float)ul_pos.getY(), w, h);
           }
           /* not supported, must be a Win 9x */
           else {

               double lowerRes = Math.min(wPrinterJob.getXRes(),
                                          wPrinterJob.getYRes());

               if ((deviceLineWidth/lowerRes) < MAX_THINLINE_INCHES) {
                   /* use the default pen styles for thin pens. */
                   wPrinterJob.selectPen(deviceLineWidth, color);
                   wPrinterJob.frameRect((float)ul_pos.getX(),
                                         (float)ul_pos.getY(), w, h);
               }
               else {
                   draw(new Rectangle2D.Float(x, y, width, height));
               }
           }
       }
       else {
           draw(new Rectangle2D.Float(x, y, width, height));
       }
   }
}
 
Example 18
/**
* Draw the bounding rectangle using transformed coordinates.
*/
protected void deviceFrameRect(int x, int y, int width, int height,
                                Color color) {

   AffineTransform deviceTransform = getTransform();

   /* check if rotated or sheared */
   int transformType = deviceTransform.getType();
   boolean usePath = ((transformType &
                      (AffineTransform.TYPE_GENERAL_ROTATION |
                       AffineTransform.TYPE_GENERAL_TRANSFORM)) != 0);

   if (usePath) {
       draw(new Rectangle2D.Float(x, y, width, height));
       return;
   }

   Stroke stroke = getStroke();

   if (stroke instanceof BasicStroke) {
       BasicStroke lineStroke = (BasicStroke) stroke;

       int endCap = lineStroke.getEndCap();
       int lineJoin = lineStroke.getLineJoin();


       /* check for default style and try to optimize it by
        * calling the frameRect native function instead of using paths.
        */
       if ((endCap == BasicStroke.CAP_SQUARE) &&
           (lineJoin == BasicStroke.JOIN_MITER) &&
           (lineStroke.getMiterLimit() ==10.0f)) {

           float lineWidth = lineStroke.getLineWidth();
           Point2D.Float penSize = new Point2D.Float(lineWidth,
                                                     lineWidth);

           deviceTransform.deltaTransform(penSize, penSize);
           float deviceLineWidth = Math.min(Math.abs(penSize.x),
                                            Math.abs(penSize.y));

           /* transform upper left coordinate */
           Point2D.Float ul_pos = new Point2D.Float(x, y);
           deviceTransform.transform(ul_pos, ul_pos);

           /* transform lower right coordinate */
           Point2D.Float lr_pos = new Point2D.Float(x + width,
                                                    y + height);
           deviceTransform.transform(lr_pos, lr_pos);

           float w = (float) (lr_pos.getX() - ul_pos.getX());
           float h = (float)(lr_pos.getY() - ul_pos.getY());

           WPrinterJob wPrinterJob = (WPrinterJob) getPrinterJob();

           /* use selectStylePen, if supported */
           if (wPrinterJob.selectStylePen(endCap, lineJoin,
                                      deviceLineWidth, color) == true)  {
               wPrinterJob.frameRect((float)ul_pos.getX(),
                                     (float)ul_pos.getY(), w, h);
           }
           /* not supported, must be a Win 9x */
           else {

               double lowerRes = Math.min(wPrinterJob.getXRes(),
                                          wPrinterJob.getYRes());

               if ((deviceLineWidth/lowerRes) < MAX_THINLINE_INCHES) {
                   /* use the default pen styles for thin pens. */
                   wPrinterJob.selectPen(deviceLineWidth, color);
                   wPrinterJob.frameRect((float)ul_pos.getX(),
                                         (float)ul_pos.getY(), w, h);
               }
               else {
                   draw(new Rectangle2D.Float(x, y, width, height));
               }
           }
       }
       else {
           draw(new Rectangle2D.Float(x, y, width, height));
       }
   }
}
 
Example 19
public static boolean isTransformQuadrantRotated(AffineTransform tr) {
    return ((tr.getType() & (AffineTransform.TYPE_GENERAL_ROTATION |
             AffineTransform.TYPE_GENERAL_TRANSFORM)) == 0);
}
 
Example 20
Source Project: jdk8u-jdk   File: XRUtils.java    License: GNU General Public License v2.0 4 votes vote down vote up
public static boolean isTransformQuadrantRotated(AffineTransform tr) {
    return ((tr.getType() & (AffineTransform.TYPE_GENERAL_ROTATION |
             AffineTransform.TYPE_GENERAL_TRANSFORM)) == 0);
}