cropprimitive2d.cxx (79aad27f) | cropprimitive2d.cxx (2376739d) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 76 unchanged lines hidden (view full) --- 85 86 getTransformation().decompose(aScale, aTranslate, fRotate, fShearX); 87 88 // detect 180 degree rotation, this is the same as mirrored in X and Y, 89 // thus change to mirroring. Prefer mirroring here. Use the equal call 90 // with getSmallValue here, the original which uses rtl::math::approxEqual 91 // is too correct here. Maybe this changes with enhanced precision in aw080 92 // to the better so that this can be reduced to the more precise call again | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 76 unchanged lines hidden (view full) --- 85 86 getTransformation().decompose(aScale, aTranslate, fRotate, fShearX); 87 88 // detect 180 degree rotation, this is the same as mirrored in X and Y, 89 // thus change to mirroring. Prefer mirroring here. Use the equal call 90 // with getSmallValue here, the original which uses rtl::math::approxEqual 91 // is too correct here. Maybe this changes with enhanced precision in aw080 92 // to the better so that this can be reduced to the more precise call again |
93 if(basegfx::fTools::equal(fRotate, F_PI, 0.000000001)) | 93 if(basegfx::fTools::equal(fabs(fRotate), F_PI, 0.000000001)) |
94 { 95 aScale.setX(aScale.getX() * -1.0); 96 aScale.setY(aScale.getY() * -1.0); 97 fRotate = 0.0; 98 } 99 100 // create target translate and scale 101 const bool bMirroredX(aScale.getX() < 0.0); --- 101 unchanged lines hidden --- | 94 { 95 aScale.setX(aScale.getX() * -1.0); 96 aScale.setY(aScale.getY() * -1.0); 97 fRotate = 0.0; 98 } 99 100 // create target translate and scale 101 const bool bMirroredX(aScale.getX() < 0.0); --- 101 unchanged lines hidden --- |