equal
deleted
inserted
replaced
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 |