54 Point aOfs(aSnap.Center());
71 aPt.setX( aPt.X() * nXMul );
72 aPt.setX( aPt.X() / nXDiv );
75 aPt.setY( aPt.Y() * nYMul );
76 aPt.setY( aPt.Y() / nYDiv );
81 if (aPt.X()<aBound.Left ()) aPt.setX(aBound.Left () );
82 if (aPt.X()>aBound.Right ()) aPt.setX(aBound.Right () );
83 if (aPt.Y()<aBound.Top ()) aPt.setY(aBound.Top () );
84 if (aPt.Y()>aBound.Bottom()) aPt.setY(aBound.Bottom() );
97 Point aOfs(aSnap.Center());
112 if (nXMul==0) nXMul=1;
113 if (nYMul==0) nYMul=1;
117 aPt.setX( aPt.X() * nXDiv );
118 aPt.setX( aPt.X() / nXMul );
121 aPt.setY( aPt.Y() * nYDiv );
122 aPt.setY( aPt.Y() / nYMul );
179 if (nAngle>=31500_deg100 || nAngle<4500_deg100)
181 if (nAngle<13500_deg100)
183 if (nAngle<22500_deg100)
217 nAW+=2_deg100*(nAngle-nAW);
225 nEW+=2_deg100*(nAngle-nEW);
230 nEW+=2_deg100*(nAngle-nEW);
235 nEW+=2_deg100*(nAngle-nEW);
240 nEW+=2_deg100*(nAngle-nEW);
266 rWin.
Invalidate(aRect, InvalidateFlags::NoErase);
284 for (sal_uInt16
i=0;
i<nCount;
i++) {
297 sal_uInt16 nInsPos=nCount;
298 sal_uInt16 nLastId=nCount!=0 ?
aList[nCount-1]->GetId() : 0;
299 DBG_ASSERT(nLastId>=nCount,
"SdrGluePointList::Insert(): nLastId<nCount");
300 bool bHole = nLastId>nCount;
302 if (!bHole || nId==0) {
306 for (sal_uInt16 nNum=0; nNum<nCount && !bBrk; nNum++) {
307 const auto& pGP2=
aList[nNum];
308 sal_uInt16 nTmpId=pGP2->GetId();
327 for (
auto& xGP :
aList)
328 xGP->Invalidate(rWin,pObj);
338 const auto& pGP=
aList[nNum];
339 if (pGP->GetId()==nId) nRet=nNum;
348 sal_uInt16 nNum = nCount;
351 const auto& pGP =
aList[nNum];
352 if (pGP->IsHit(rPnt,rOut,pObj))
360 for (
auto& xGP :
aList)
361 xGP->SetReallyAbsolute(bOn,rObj);
366 for (
auto& xGP :
aList)
367 xGP->Rotate(rRef,nAngle,sn,cs,pObj);
372 Point aPt(rRef2); aPt-=rRef1;
374 Mirror(rRef1,rRef2,nAngle,pObj);
379 for (
auto& xGP :
aList)
380 xGP->Mirror(rRef1,rRef2,nAngle,pObj);
385 for (
auto& xGP :
aList)
386 xGP->Shear(rRef,tn,bVShear,pObj);
void SetId(sal_uInt16 nNewId)
void ShearPoint(Point &rPnt, const Point &rRef, double tn, bool bVShear=false)
const Size aGlueHalfSize(4, 4)
SdrAlign GetVertAlign() const
bool IsMapModeEnabled() const
static SdrEscapeDirection EscAngleToDir(Degree100 nAngle)
void Rotate(const Point &rRef, Degree100 nAngle, double sn, double cs, const SdrObject *pObj)
void EnableMapMode(bool bEnable=true)
sal_uInt16 GetCount() const
SdrGluePointList & operator=(const SdrGluePointList &rSrcList)
virtual const tools::Rectangle & GetSnapRect() const
void Mirror(const Point &rRef1, const Point &rRef2, const SdrObject *pObj)
sal_uInt16 HitTest(const Point &rPnt, const OutputDevice &rOut, const SdrObject *pObj) const
bool IsHit(const Point &rPnt, const OutputDevice &rOut, const SdrObject *pObj) const
void Rotate(const Point &rRef, Degree100 nAngle, double sn, double cs, const SdrObject *pObj)
Degree100 NormAngle36000(Degree100 deg100)
Normalize angle to -180.00..179.99.
SdrAlign GetHorzAlign() const
#define DBG_ASSERT(sCon, aError)
std::vector< std::unique_ptr< SdrGluePoint > > aList
#define SDRGLUEPOINT_NOTFOUND
Degree100 GetAngle(const Point &rPnt)
The Y axis points down! The function negates the Y axis, when calculating the angle, such that GetAngle(Point(0,-1))=90 deg.
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
void MirrorPoint(Point &rPnt, const Point &rRef1, const Point &rRef2)
void Invalidate(vcl::Window &rWin, const SdrObject *pObj) const
tools::Long Width() const
void SetAbsolutePos(const Point &rNewPos, const SdrObject &rObj)
void SetReallyAbsolute(bool bOn, const SdrObject &rObj)
Point GetAbsolutePos(const SdrObject &rObj) const
sal_uInt16 FindGluePoint(sal_uInt16 nId) const
sal_uInt16 Insert(const SdrGluePoint &rGP)
Point PixelToLogic(const Point &rDevicePt) const
Point LogicToPixel(const Point &rLogicPt) const
void RotatePoint(Point &rPnt, const Point &rRef, double sn, double cs)
Degree100 GetAlignAngle() const
SdrEscapeDirection nEscDir
static Degree100 EscDirToAngle(SdrEscapeDirection nEsc)
void Shear(const Point &rRef, double tn, bool bVShear, const SdrObject *pObj)
tools::Long Height() const
const Point & GetPos() const
void SetReallyAbsolute(bool bOn, const SdrObject &rObj)
void Shear(const Point &rRef, double tn, bool bVShear, const SdrObject *pObj)
void SetAlignAngle(Degree100 nAngle)
void Mirror(const Point &rRef1, const Point &rRef2, Degree100 nAngle, const SdrObject *pObj)
void SetPos(const Point &rNewPos)
void Invalidate(vcl::Window &rWin, const SdrObject *pObj) const