LibreOffice Module svx (master) 1
|
The transformation of a rectangle into a polygon, by using angle parameters from GeoStat. More...
#include <svdtrans.hxx>
Public Member Functions | |
GeoStat () | |
void | RecalcSinCos () |
void | RecalcTan () |
Public Attributes | |
Degree100 | m_nRotationAngle |
Degree100 | m_nShearAngle |
double | mfTanShearAngle |
double | mfSinRotationAngle |
double | mfCosRotationAngle |
The transformation of a rectangle into a polygon, by using angle parameters from GeoStat.
---------— The point of reference is always the Point 0, meaning /1 2/ the upper left corner of the initial rectangle. / / When calculating the polygon, the order is first / / shear and then the rotation. / / / / \ / / | A) Initial rectangle aRect B) After applying Shear /0 3/ Rot| +---------------—+ -----------------— ---------------— |0 1| \0 1\ C) After applying Rotate | | \ \ | | | \ \ |3 2| | \3 2\ +---------------—+ | -----------------— |Shr
When converting the polygon back into a rect, the order is necessarily the other way around:
We need to keep in mind that the polygon can be mirrored when it was transformed in the meantime (e.g. mirror or resize with negative factor). In that case, we first need to normalize, by swapping points (0 with 3 and 1 with 2), so that it has the right orientation.
Note: a positive shear angle means a shear with a positive visible curvature on the screen. Mathematically, that would be a negative curvature, as the Y axis runs from top to bottom on the screen. Rotation angle: positive means a visible left rotation.
Definition at line 201 of file svdtrans.hxx.
|
inline |
Definition at line 209 of file svdtrans.hxx.
void GeoStat::RecalcSinCos | ( | ) |
Definition at line 444 of file svdtrans.cxx.
References a, m_nRotationAngle, mfCosRotationAngle, mfSinRotationAngle, and toRadians().
Referenced by SdrGrafObj::DoConvertToPolyObj(), SdrEditView::DoImportMarkedMtf(), SdrPathObj::ImpForceLineAngle(), SdrTextObj::NbcMirror(), SdrTextObj::NbcResize(), SdrObjCustomShape::NbcRotate(), SdrTextObj::NbcRotate(), svx::polygonToRectangle(), SdrMeasureObj::TakeUnrotatedSnapRect(), SdrObjCustomShape::TRSetBaseGeometry(), SdrPathObj::TRSetBaseGeometry(), and SdrTextObj::TRSetBaseGeometry().
void GeoStat::RecalcTan | ( | ) |
Definition at line 456 of file svdtrans.cxx.
References a, m_nShearAngle, mfTanShearAngle, and toRadians().
Referenced by SdrGrafObj::DoConvertToPolyObj(), SdrEditView::DoImportMarkedMtf(), SdrPathObj::ImpForceLineAngle(), SdrTextObj::NbcMirror(), SdrTextObj::NbcResize(), svx::polygonToRectangle(), SdrObjCustomShape::TRSetBaseGeometry(), SdrPathObj::TRSetBaseGeometry(), and SdrTextObj::TRSetBaseGeometry().
Degree100 GeoStat::m_nRotationAngle |
Definition at line 203 of file svdtrans.hxx.
Referenced by SdrCircObj::AddToHdlList(), SdrRectObj::AddToHdlList(), SdrTextObj::AddToHdlList(), SdrTextObj::AdjustTextFrameWidthAndHeight(), SdrObjCustomShape::AdjustTextFrameWidthAndHeight(), SdrCircObj::applySpecialDrag(), SdrRectObj::applySpecialDrag(), SdrTextObj::applySpecialDrag(), SdrTextObj::BegTextEdit(), sdr::contact::ViewContactOfSdrOle2Obj::createObjectTransform(), sdr::contact::createPrimitive2DSequenceImpl(), sdr::contact::ViewContactOfGraphic::createViewIndependentPrimitive2DSequence(), sdr::contact::ViewContactOfSdrCaptionObj::createViewIndependentPrimitive2DSequence(), sdr::contact::ViewContactOfSdrCircObj::createViewIndependentPrimitive2DSequence(), sdr::contact::ViewContactOfSdrObjCustomShape::createViewIndependentPrimitive2DSequence(), sdr::contact::ViewContactOfSdrPathObj::createViewIndependentPrimitive2DSequence(), sdr::contact::ViewContactOfSdrRectObj::createViewIndependentPrimitive2DSequence(), SdrGrafObj::DoConvertToPolyObj(), SdrEditView::DoImportMarkedMtf(), SdrObjCustomShape::DragResizeCustomShape(), SvxGrafAttrHelper::ExecuteGrafAttr(), SdrRectObj::GetCornerGluePoint(), sdr::contact::ViewContactOfSdrObjCustomShape::getCorrectedTextBoundRect(), SdrGrafObj::GetGraphicAttr(), SvxIMapInfo::GetHitIMapObject(), SdrTextObj::GetRotateAngle(), SdrTextObj::GetSnapPoint(), SdrRectObj::getSpecialDragComment(), SdrTextObj::GetTextScrollMetaFileAndRectangle(), SdrObjCustomShape::GetVertexGluePoint(), SdrRectObj::GetVertexGluePoint(), SdrRectObj::ImpCalcXPoly(), SdrCircObj::ImpCalcXPolyCirc(), SdrObjCustomShape::ImpCheckCustomGluePointsAreAdded(), SdrEditView::ImpDismantleOneObject(), SdrTextObj::ImpDragCalcRect(), SdrPathObj::ImpForceLineAngle(), SdrTextObj::ImpSetContourPolygon(), SdrObjCustomShape::NbcMirror(), SdrCircObj::NbcMirror(), SdrTextObj::NbcMirror(), SdrObjCustomShape::NbcResize(), SdrCircObj::NbcResize(), SdrTextObj::NbcResize(), SdrUnoObj::NbcResize(), SdrObjCustomShape::NbcRotate(), SdrTextObj::NbcRotate(), SdrCircObj::NbcSetSnapRect(), SdrTextObj::NbcSetSnapRect(), SdrObjCustomShape::NbcShear(), SdrCircObj::PaintNeedsXPolyCirc(), SdrView::PickAnything(), svx::polygonToRectangle(), RecalcSinCos(), SdrRectObj::RecalcSnapRect(), SdrTextObj::RecalcSnapRect(), Rect2Poly(), SdrTextObj::TakeContour(), SdrGrafObj::TakeObjInfo(), SdrRectObj::TakeObjInfo(), SdrTextObj::TakeObjInfo(), SdrTextObj::TakeTextAnchorRect(), SdrObjCustomShape::TakeTextAnchorRect(), SdrTextObj::TakeTextEditArea(), SdrObjCustomShape::TakeTextEditArea(), SdrTextObj::TakeTextRect(), SdrObjCustomShape::TakeTextRect(), SdrCircObj::TakeUnrotatedSnapRect(), SdrMeasureObj::TakeUnrotatedSnapRect(), SdrPathObj::TakeUnrotatedSnapRect(), SdrTextObj::TakeXorPoly(), SdrPathObj::TRGetBaseGeometry(), SdrTextObj::TRGetBaseGeometry(), SdrObjCustomShape::TRSetBaseGeometry(), SdrPathObj::TRSetBaseGeometry(), and SdrTextObj::TRSetBaseGeometry().
Degree100 GeoStat::m_nShearAngle |
Definition at line 204 of file svdtrans.hxx.
Referenced by SdrCircObj::AddToHdlList(), SdrRectObj::AddToHdlList(), SdrTextObj::AddToHdlList(), SdrCircObj::applySpecialDrag(), SdrTextObj::applySpecialDrag(), sdr::contact::ViewContactOfSdrObjCustomShape::createViewIndependentPrimitive2DSequence(), SdrGrafObj::DoConvertToPolyObj(), SdrEditView::DoImportMarkedMtf(), SdrObjCustomShape::DragResizeCustomShape(), SvxGrafAttrHelper::ExecuteGrafAttr(), SdrRectObj::GetCornerGluePoint(), sdr::contact::ViewContactOfSdrObjCustomShape::getCorrectedTextBoundRect(), EnhancedCustomShape2d::GetHandlePosition(), SvxIMapInfo::GetHitIMapObject(), SdrTextObj::GetShearAngle(), SdrTextObj::GetSnapPoint(), SdrObjCustomShape::GetVertexGluePoint(), SdrRectObj::GetVertexGluePoint(), SdrRectObj::ImpCalcXPoly(), SdrCircObj::ImpCalcXPolyCirc(), SdrObjCustomShape::ImpCheckCustomGluePointsAreAdded(), SdrTextObj::ImpCheckShear(), SdrTextObj::ImpDragCalcRect(), SdrPathObj::ImpForceLineAngle(), SdrCircObj::NbcMirror(), SdrTextObj::NbcMirror(), SdrCircObj::NbcResize(), SdrTextObj::NbcResize(), SdrUnoObj::NbcResize(), SdrCircObj::NbcSetSnapRect(), SdrTextObj::NbcSetSnapRect(), SdrCircObj::PaintNeedsXPolyCirc(), SdrView::PickAnything(), svx::polygonToRectangle(), SdrRectObj::RecalcSnapRect(), SdrTextObj::RecalcSnapRect(), RecalcTan(), Rect2Poly(), EnhancedCustomShape2d::SetHandleControllerPosition(), SdrCircObj::TakeObjNamePlural(), SdrRectObj::TakeObjNamePlural(), SdrCircObj::TakeObjNameSingul(), SdrRectObj::TakeObjNameSingul(), SdrCircObj::TakeUnrotatedSnapRect(), SdrRectObj::TakeUnrotatedSnapRect(), SdrTextObj::TakeXorPoly(), SdrObjCustomShape::TRGetBaseGeometry(), SdrPathObj::TRGetBaseGeometry(), SdrTextObj::TRGetBaseGeometry(), SdrObjCustomShape::TRSetBaseGeometry(), SdrPathObj::TRSetBaseGeometry(), and SdrTextObj::TRSetBaseGeometry().
double GeoStat::mfCosRotationAngle |
Definition at line 207 of file svdtrans.hxx.
Referenced by SdrCircObj::AddToHdlList(), SdrRectObj::AddToHdlList(), SdrTextObj::AddToHdlList(), SdrTextObj::AdjustTextFrameWidthAndHeight(), SdrObjCustomShape::AdjustTextFrameWidthAndHeight(), SdrCircObj::applySpecialDrag(), SdrRectObj::applySpecialDrag(), SdrTextObj::applySpecialDrag(), SdrGrafObj::DoConvertToPolyObj(), SdrEditView::DoImportMarkedMtf(), SdrObjCustomShape::DragResizeCustomShape(), SvxGrafAttrHelper::ExecuteGrafAttr(), SdrRectObj::GetCornerGluePoint(), SvxIMapInfo::GetHitIMapObject(), SdrTextObj::GetSnapPoint(), SdrRectObj::getSpecialDragComment(), SdrObjCustomShape::GetVertexGluePoint(), SdrRectObj::GetVertexGluePoint(), SdrRectObj::ImpCalcXPoly(), SdrEditView::ImpDismantleOneObject(), SdrTextObj::ImpDragCalcRect(), SdrCircObj::NbcMirror(), SdrUnoObj::NbcResize(), SdrObjCustomShape::NbcRotate(), SdrTextObj::NbcRotate(), svx::polygonToRectangle(), RecalcSinCos(), Rect2Poly(), SdrTextObj::TakeContour(), SdrTextObj::TakeTextAnchorRect(), SdrObjCustomShape::TakeTextAnchorRect(), SdrTextObj::TakeTextEditArea(), SdrObjCustomShape::TakeTextEditArea(), SdrTextObj::TakeTextRect(), SdrObjCustomShape::TakeTextRect(), SdrCircObj::TakeUnrotatedSnapRect(), SdrPathObj::TakeUnrotatedSnapRect(), SdrRectObj::TakeUnrotatedSnapRect(), SdrTextObj::TakeXorPoly(), SdrObjCustomShape::TRSetBaseGeometry(), and SdrTextObj::TRSetBaseGeometry().
double GeoStat::mfSinRotationAngle |
Definition at line 206 of file svdtrans.hxx.
Referenced by SdrCircObj::AddToHdlList(), SdrRectObj::AddToHdlList(), SdrTextObj::AddToHdlList(), SdrTextObj::AdjustTextFrameWidthAndHeight(), SdrObjCustomShape::AdjustTextFrameWidthAndHeight(), SdrCircObj::applySpecialDrag(), SdrRectObj::applySpecialDrag(), SdrTextObj::applySpecialDrag(), SdrGrafObj::DoConvertToPolyObj(), SdrEditView::DoImportMarkedMtf(), SdrObjCustomShape::DragResizeCustomShape(), SvxGrafAttrHelper::ExecuteGrafAttr(), SdrRectObj::GetCornerGluePoint(), SvxIMapInfo::GetHitIMapObject(), SdrTextObj::GetSnapPoint(), SdrRectObj::getSpecialDragComment(), SdrObjCustomShape::GetVertexGluePoint(), SdrRectObj::GetVertexGluePoint(), SdrRectObj::ImpCalcXPoly(), SdrEditView::ImpDismantleOneObject(), SdrTextObj::ImpDragCalcRect(), SdrCircObj::NbcMirror(), SdrUnoObj::NbcResize(), SdrObjCustomShape::NbcRotate(), SdrTextObj::NbcRotate(), svx::polygonToRectangle(), RecalcSinCos(), Rect2Poly(), SdrTextObj::TakeContour(), SdrTextObj::TakeTextAnchorRect(), SdrObjCustomShape::TakeTextAnchorRect(), SdrTextObj::TakeTextEditArea(), SdrObjCustomShape::TakeTextEditArea(), SdrTextObj::TakeTextRect(), SdrObjCustomShape::TakeTextRect(), SdrCircObj::TakeUnrotatedSnapRect(), SdrPathObj::TakeUnrotatedSnapRect(), SdrRectObj::TakeUnrotatedSnapRect(), SdrTextObj::TakeXorPoly(), SdrObjCustomShape::TRSetBaseGeometry(), and SdrTextObj::TRSetBaseGeometry().
double GeoStat::mfTanShearAngle |
Definition at line 205 of file svdtrans.hxx.
Referenced by SdrCircObj::AddToHdlList(), SdrRectObj::AddToHdlList(), SdrTextObj::AddToHdlList(), SdrCircObj::applySpecialDrag(), SdrTextObj::applySpecialDrag(), sdr::contact::ViewContactOfSdrOle2Obj::createObjectTransform(), sdr::contact::createPrimitive2DSequenceImpl(), sdr::contact::ViewContactOfGraphic::createViewIndependentPrimitive2DSequence(), sdr::contact::ViewContactOfSdrCaptionObj::createViewIndependentPrimitive2DSequence(), sdr::contact::ViewContactOfSdrCircObj::createViewIndependentPrimitive2DSequence(), sdr::contact::ViewContactOfSdrObjCustomShape::createViewIndependentPrimitive2DSequence(), sdr::contact::ViewContactOfSdrPathObj::createViewIndependentPrimitive2DSequence(), sdr::contact::ViewContactOfSdrRectObj::createViewIndependentPrimitive2DSequence(), SdrGrafObj::DoConvertToPolyObj(), SdrEditView::DoImportMarkedMtf(), SdrObjCustomShape::DragResizeCustomShape(), SvxGrafAttrHelper::ExecuteGrafAttr(), SdrRectObj::GetCornerGluePoint(), sdr::contact::ViewContactOfSdrObjCustomShape::getCorrectedTextBoundRect(), EnhancedCustomShape2d::GetHandlePosition(), SvxIMapInfo::GetHitIMapObject(), SdrTextObj::GetSnapPoint(), SdrObjCustomShape::GetVertexGluePoint(), SdrRectObj::GetVertexGluePoint(), SdrRectObj::ImpCalcXPoly(), SdrCircObj::ImpCalcXPolyCirc(), SdrObjCustomShape::ImpCheckCustomGluePointsAreAdded(), SdrTextObj::ImpCheckShear(), SdrTextObj::ImpDragCalcRect(), SdrCircObj::NbcMirror(), SdrUnoObj::NbcResize(), RecalcTan(), Rect2Poly(), EnhancedCustomShape2d::SetHandleControllerPosition(), SdrCircObj::TakeUnrotatedSnapRect(), SdrRectObj::TakeUnrotatedSnapRect(), SdrTextObj::TakeXorPoly(), SdrPathObj::TRGetBaseGeometry(), SdrObjCustomShape::TRSetBaseGeometry(), and SdrTextObj::TRSetBaseGeometry().