equal
deleted
inserted
replaced
244 |
244 |
245 if (at == null) { |
245 if (at == null) { |
246 widthScale = 1.0d; |
246 widthScale = 1.0d; |
247 } else if ((at.getType() & (AffineTransform.TYPE_GENERAL_TRANSFORM | |
247 } else if ((at.getType() & (AffineTransform.TYPE_GENERAL_TRANSFORM | |
248 AffineTransform.TYPE_GENERAL_SCALE)) != 0) { |
248 AffineTransform.TYPE_GENERAL_SCALE)) != 0) { |
249 widthScale = Math.sqrt(at.getDeterminant()); |
249 // Determinant may be negative (flip), use its absolute value: |
|
250 widthScale = Math.sqrt(Math.abs(at.getDeterminant())); |
250 } else { |
251 } else { |
251 // First calculate the "maximum scale" of this transform. |
252 // First calculate the "maximum scale" of this transform. |
252 double A = at.getScaleX(); // m00 |
253 double A = at.getScaleX(); // m00 |
253 double C = at.getShearX(); // m01 |
254 double C = at.getShearX(); // m01 |
254 double B = at.getShearY(); // m10 |
255 double B = at.getShearY(); // m10 |