Kaydet (Commit) 3a23ea92 authored tarafından Armin Le Grand's avatar Armin Le Grand

#119863# Corrected rotation center for animations

üst c40a9701
...@@ -218,15 +218,27 @@ namespace sdr ...@@ -218,15 +218,27 @@ namespace sdr
xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
} }
// always append an invisible outline for the cases where no visible content exists // #119863# always append an invisible outline for the cases where no visible content exists
const Rectangle aObjectBound(GetCustomShapeObj().GetGeoRect()); if(true)
const basegfx::B2DRange aObjectRange( {
aObjectBound.Left(), aObjectBound.Top(), const Rectangle aObjectBound(GetCustomShapeObj().GetGeoRect());
aObjectBound.Right(), aObjectBound.Bottom()); const basegfx::B2DRange aObjectRange(
aObjectBound.Left(), aObjectBound.Top(),
aObjectBound.Right(), aObjectBound.Bottom());
drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval, // create object matrix
drawinglayer::primitive2d::createHiddenGeometryPrimitives2D( const GeoStat& rGeoStat(GetCustomShapeObj().GetGeoStat());
false, aObjectRange)); const double fShearX(rGeoStat.nShearWink ? tan((36000 - rGeoStat.nShearWink) * F_PI18000) : 0.0);
const double fRotate(rGeoStat.nDrehWink ? (36000 - rGeoStat.nDrehWink) * F_PI18000 : 0.0);
const basegfx::B2DHomMatrix aObjectMatrix(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix(
aObjectRange.getWidth(), aObjectRange.getHeight(), fShearX, fRotate,
aObjectRange.getMinX(), aObjectRange.getMinY()));
drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval,
drawinglayer::primitive2d::createHiddenGeometryPrimitives2D(
false,
aObjectMatrix));
}
return xRetval; return xRetval;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment