src/java.desktop/share/classes/sun/java2d/marlin/MarlinRenderingEngine.java
changeset 58321 7f55aad34ac4
parent 51933 4ec74929fbfe
equal deleted inserted replaced
58320:3020baa4efa4 58321:7f55aad34ac4
   243 
   243 
   244         if (at == null) {
   244         if (at == null) {
   245             widthScale = 1.0f;
   245             widthScale = 1.0f;
   246         } else if ((at.getType() & (AffineTransform.TYPE_GENERAL_TRANSFORM  |
   246         } else if ((at.getType() & (AffineTransform.TYPE_GENERAL_TRANSFORM  |
   247                                     AffineTransform.TYPE_GENERAL_SCALE)) != 0) {
   247                                     AffineTransform.TYPE_GENERAL_SCALE)) != 0) {
   248             widthScale = (float)Math.sqrt(at.getDeterminant());
   248             // Determinant may be negative (flip), use its absolute value:
       
   249             widthScale = (float)Math.sqrt(Math.abs(at.getDeterminant()));
   249         } else {
   250         } else {
   250             // First calculate the "maximum scale" of this transform.
   251             // First calculate the "maximum scale" of this transform.
   251             double A = at.getScaleX();       // m00
   252             double A = at.getScaleX();       // m00
   252             double C = at.getShearX();       // m01
   253             double C = at.getShearX();       // m01
   253             double B = at.getShearY();       // m10
   254             double B = at.getShearY();       // m10