LibreOffice Module sw (master) 1
|
RotateFlyFrame3: Helper class when you want to make your SwFrame derivate transformable. More...
#include <frame.hxx>
Public Member Functions | |
TransformableSwFrame (SwFrameAreaDefinition &rSwFrameAreaDefinition) | |
const basegfx::B2DHomMatrix & | getLocalFrameAreaTransformation () const |
const basegfx::B2DHomMatrix & | getLocalFramePrintAreaTransformation () const |
SwRect | getUntransformedFrameArea () const |
SwRect | getUntransformedFramePrintArea () const |
void | createFrameAreaTransformations (double fRotation, const basegfx::B2DPoint &rCenter) |
void | restoreFrameAreas () |
void | adaptFrameAreasToTransformations () |
void | transform (const basegfx::B2DHomMatrix &aTransform) |
Private Attributes | |
SwFrameAreaDefinition & | mrSwFrameAreaDefinition |
basegfx::B2DHomMatrix | maFrameAreaTransformation |
basegfx::B2DHomMatrix | maFramePrintAreaTransformation |
RotateFlyFrame3: Helper class when you want to make your SwFrame derivate transformable.
It provides some tooling to do so. To use, add as member (see e.g. SwFlyFreeFrame which uses 'std::unique_ptr< TransformableSwFrame >')
|
inline |
void TransformableSwFrame::adaptFrameAreasToTransformations | ( | ) |
Definition at line 236 of file wsfrm.cxx.
References basegfx::fround(), basegfx::Range2D< typename TYPE, typename TRAITS >::getHeight(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMinX(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMinY(), basegfx::Range2D< typename TYPE, typename TRAITS >::getWidth(), SwFrameAreaDefinition::FrameAreaWriteAccess::setSwRect(), SwFrameAreaDefinition::FramePrintAreaWriteAccess::setSwRect(), and basegfx::B2DRange::transform().
Referenced by SwFlyFreeFrame::MakeAll(), and SwNoTextFrame::MakeAll().
void TransformableSwFrame::createFrameAreaTransformations | ( | double | fRotation, |
const basegfx::B2DPoint & | rCenter | ||
) |
Definition at line 216 of file wsfrm.cxx.
References basegfx::utils::createRotateAroundPoint(), basegfx::utils::createScaleTranslateB2DHomMatrix(), basegfx::Tuple2D< typename TYPE >::getX(), basegfx::Tuple2D< typename TYPE >::getY(), SwRect::Height(), SwRect::Left(), SwRect::Top(), and SwRect::Width().
Referenced by SwFlyFreeFrame::MakeAll(), and SwNoTextFrame::MakeAll().
|
inline |
Definition at line 255 of file frame.hxx.
References maFrameAreaTransformation.
Referenced by SwFlyFreeFrame::getFrameAreaTransformation(), and SwNoTextFrame::getFrameAreaTransformation().
|
inline |
Definition at line 261 of file frame.hxx.
References maFramePrintAreaTransformation.
Referenced by SwFlyFreeFrame::getFramePrintAreaTransformation(), and SwNoTextFrame::getFramePrintAreaTransformation().
SwRect TransformableSwFrame::getUntransformedFrameArea | ( | ) | const |
Definition at line 167 of file wsfrm.cxx.
References basegfx::absolute(), basegfx::B2DHomMatrix::decompose(), basegfx::fround(), basegfx::Tuple2D< typename TYPE >::getX(), basegfx::Tuple2D< typename TYPE >::getY(), and basegfx::B2DHomMatrix::isIdentity().
Referenced by SwFlyFrame::GetContour(), SwNoTextFrame::GetGrfArea(), and SwFEShell::SetFlyPos().
SwRect TransformableSwFrame::getUntransformedFramePrintArea | ( | ) | const |
Definition at line 191 of file wsfrm.cxx.
References basegfx::absolute(), basegfx::B2DHomMatrix::decompose(), basegfx::fround(), basegfx::Tuple2D< typename TYPE >::getX(), basegfx::Tuple2D< typename TYPE >::getY(), basegfx::B2DHomMatrix::isIdentity(), SwRect::Left(), and SwRect::Top().
Referenced by SwNoTextFrame::GetGrfArea().
void TransformableSwFrame::restoreFrameAreas | ( | ) |
Definition at line 271 of file wsfrm.cxx.
References SwFrameAreaDefinition::FrameAreaWriteAccess::setSwRect(), and SwFrameAreaDefinition::FramePrintAreaWriteAccess::setSwRect().
Referenced by SwFlyFreeFrame::MakeAll(), SwNoTextFrame::MakeAll(), SwVirtFlyDrawObj::NbcCrop(), SwVirtFlyDrawObj::NbcMove(), and SwVirtFlyDrawObj::NbcResize().
void TransformableSwFrame::transform | ( | const basegfx::B2DHomMatrix & | aTransform | ) |
Definition at line 289 of file wsfrm.cxx.
Referenced by SwFlyFreeFrame::transform_translate(), and SwNoTextFrame::transform_translate().
|
private |
Definition at line 243 of file frame.hxx.
Referenced by getLocalFrameAreaTransformation().
|
private |
Definition at line 244 of file frame.hxx.
Referenced by getLocalFramePrintAreaTransformation().
|
private |