LibreOffice Module sd (master) 1
fumorph.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <fumorph.hxx>
21#include <svx/xfillit0.hxx>
22#include <svx/xlineit0.hxx>
23#include <svx/xlnclit.hxx>
24#include <svx/xlnwtit.hxx>
25#include <svx/xflclit.hxx>
26#include <svx/svdopath.hxx>
27#include <svx/svdogrp.hxx>
28#include <editeng/eeitem.hxx>
29
30#include <View.hxx>
31#include <Window.hxx>
36
37#include <strings.hrc>
38#include <sdresid.hxx>
39
40#include <sdabstdlg.hxx>
41
42#include <svx/svditer.hxx>
43
45#include <com/sun/star/drawing/LineStyle.hpp>
46
47using namespace com::sun::star;
48
49namespace sd {
50
52 ViewShell* pViewSh,
53 ::sd::Window* pWin,
54 ::sd::View* pView,
55 SdDrawDocument* pDoc,
56 SfxRequest& rReq )
57 : FuPoor(pViewSh, pWin, pView, pDoc, rReq)
58{
59}
60
62 ViewShell* pViewSh,
63 ::sd::Window* pWin,
64 ::sd::View* pView,
65 SdDrawDocument* pDoc,
66 SfxRequest& rReq
67)
68{
69 rtl::Reference<FuPoor> xFunc( new FuMorph( pViewSh, pWin, pView, pDoc, rReq ) );
70 xFunc->DoExecute(rReq);
71 return xFunc;
72}
73
75{
76 const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
77
78 if(rMarkList.GetMarkCount() != 2)
79 return;
80
81 // create clones
82 SdrObject* pObj1 = rMarkList.GetMark(0)->GetMarkedSdrObj();
83 SdrObject* pObj2 = rMarkList.GetMark(1)->GetMarkedSdrObj();
86
87 // delete text at clone, otherwise we do not get a correct PathObj
88 pCloneObj1->SetOutlinerParaObject(std::nullopt);
89 pCloneObj2->SetOutlinerParaObject(std::nullopt);
90
91 // create path objects
92 rtl::Reference<SdrObject> pPolyObj1 = pCloneObj1->ConvertToPolyObj(false, false);
93 rtl::Reference<SdrObject> pPolyObj2 = pCloneObj2->ConvertToPolyObj(false, false);
95 ScopedVclPtr<AbstractMorphDlg> pDlg( pFact->CreateMorphDlg(mpWindow ? mpWindow->GetFrameWeld() : nullptr, pObj1, pObj2) );
96 if(pPolyObj1 && pPolyObj2 && (pDlg->Execute() == RET_OK))
97 {
98 B2DPolyPolygonList_impl aPolyPolyList;
100 ::basegfx::B2DPolyPolygon aPolyPoly2;
101
102 pDlg->SaveSettings();
103
104 // #i48168# Not always is the pPolyObj1/pPolyObj2 a SdrPathObj, it may also be a group object
105 // containing SdrPathObjs. To get the polygons, I add two iters here
106 SdrObjListIter aIter1(*pPolyObj1);
107 SdrObjListIter aIter2(*pPolyObj2);
108
109 while(aIter1.IsMore())
110 {
111 SdrObject* pObj = aIter1.Next();
112 if(auto pPathObj = dynamic_cast< SdrPathObj *>( pObj ))
113 aPolyPoly1.append(pPathObj->GetPathPoly());
114 }
115
116 while(aIter2.IsMore())
117 {
118 SdrObject* pObj = aIter2.Next();
119 if(auto pPathObj = dynamic_cast< SdrPathObj *>( pObj ))
120 aPolyPoly2.append(pPathObj->GetPathPoly());
121 }
122
123 // perform morphing
124 if(aPolyPoly1.count() && aPolyPoly2.count())
125 {
126 aPolyPoly1 = ::basegfx::utils::correctOrientations(aPolyPoly1);
127 aPolyPoly1.removeDoublePoints();
128 ::basegfx::B2VectorOrientation eIsClockwise1(::basegfx::utils::getOrientation(aPolyPoly1.getB2DPolygon(0)));
129
130 aPolyPoly2 = ::basegfx::utils::correctOrientations(aPolyPoly2);
131 aPolyPoly2.removeDoublePoints();
132 ::basegfx::B2VectorOrientation eIsClockwise2(::basegfx::utils::getOrientation(aPolyPoly2.getB2DPolygon(0)));
133
134 // set same orientation
135 if(eIsClockwise1 != eIsClockwise2)
136 aPolyPoly2.flip();
137
138 // force same poly count
139 if(aPolyPoly1.count() < aPolyPoly2.count())
140 ImpAddPolys(aPolyPoly1, aPolyPoly2);
141 else if(aPolyPoly2.count() < aPolyPoly1.count())
142 ImpAddPolys(aPolyPoly2, aPolyPoly1);
143
144 // use orientation flag from dialog
145 if(!pDlg->IsOrientationFade())
146 aPolyPoly2.flip();
147
148 // force same point counts
149 for( sal_uInt32 a(0); a < aPolyPoly1.count(); a++ )
150 {
151 ::basegfx::B2DPolygon aSub1(aPolyPoly1.getB2DPolygon(a));
152 ::basegfx::B2DPolygon aSub2(aPolyPoly2.getB2DPolygon(a));
153
154 if(aSub1.count() < aSub2.count())
155 ImpEqualizePolyPointCount(aSub1, aSub2);
156 else if(aSub2.count() < aSub1.count())
157 ImpEqualizePolyPointCount(aSub2, aSub1);
158
159 aPolyPoly1.setB2DPolygon(a, aSub1);
160 aPolyPoly2.setB2DPolygon(a, aSub2);
161 }
162
163 ImpMorphPolygons(aPolyPoly1, aPolyPoly2, pDlg->GetFadeSteps(), aPolyPolyList);
164
165 OUString aString = mpView->GetDescriptionOfMarkedObjects() +
166 " " + SdResId(STR_UNDO_MORPHING);
167
168 mpView->BegUndo(aString);
169 ImpInsertPolygons(aPolyPolyList, pDlg->IsAttributeFade(), pObj1, pObj2);
170 mpView->EndUndo();
171 }
172 }
173}
174
175static ::basegfx::B2DPolygon ImpGetExpandedPolygon(
176 const ::basegfx::B2DPolygon& rCandidate,
177 sal_uInt32 nNum
178)
179{
180 if(rCandidate.count() && nNum && rCandidate.count() != nNum)
181 {
182 // length of step in dest poly
183 ::basegfx::B2DPolygon aRetval;
184 const double fStep(::basegfx::utils::getLength(rCandidate) / static_cast<double>(rCandidate.isClosed() ? nNum : nNum - 1));
185 double fDestPos(0.0);
186 double fSrcPos(0.0);
187 sal_uInt32 nSrcPos(0);
188 sal_uInt32 nSrcPosNext((nSrcPos + 1 == rCandidate.count()) ? 0 : nSrcPos + 1);
189 double fNextSrcLen(::basegfx::B2DVector(rCandidate.getB2DPoint(nSrcPos) - rCandidate.getB2DPoint(nSrcPosNext)).getLength());
190
191 for(sal_uInt32 b(0); b < nNum; b++)
192 {
193 // calc fDestPos in source
194 while(fSrcPos + fNextSrcLen < fDestPos)
195 {
196 fSrcPos += fNextSrcLen;
197 nSrcPos++;
198 nSrcPosNext = (nSrcPos + 1 == rCandidate.count()) ? 0 : nSrcPos + 1;
199 fNextSrcLen = ::basegfx::B2DVector(rCandidate.getB2DPoint(nSrcPos) - rCandidate.getB2DPoint(nSrcPosNext)).getLength();
200 }
201
202 // fDestPos is between fSrcPos and (fSrcPos + fNextSrcLen)
203 const double fLenA((fDestPos - fSrcPos) / fNextSrcLen);
204 const ::basegfx::B2DPoint aOld1(rCandidate.getB2DPoint(nSrcPos));
205 const ::basegfx::B2DPoint aOld2(rCandidate.getB2DPoint(nSrcPosNext));
206 ::basegfx::B2DPoint aNewPoint(basegfx::interpolate(aOld1, aOld2, fLenA));
207 aRetval.append(aNewPoint);
208
209 // next step
210 fDestPos += fStep;
211 }
212
213 if(aRetval.count() >= 3)
214 {
215 aRetval.setClosed(rCandidate.isClosed());
216 }
217
218 return aRetval;
219 }
220 else
221 {
222 return rCandidate;
223 }
224}
225
230 ::basegfx::B2DPolygon& rSmall,
231 const ::basegfx::B2DPolygon& rBig
232)
233{
234 // create poly with equal point count
235 const sal_uInt32 nCnt(rBig.count());
236 ::basegfx::B2DPolygon aPoly1(ImpGetExpandedPolygon(rSmall, nCnt));
237
238 // create transformation for rBig to do the compare
239 const ::basegfx::B2DRange aSrcSize(::basegfx::utils::getRange(rBig));
240 const ::basegfx::B2DPoint aSrcPos(aSrcSize.getCenter());
241 const ::basegfx::B2DRange aDstSize(::basegfx::utils::getRange(rSmall));
242 const ::basegfx::B2DPoint aDstPos(aDstSize.getCenter());
243
244 basegfx::B2DHomMatrix aTrans(basegfx::utils::createTranslateB2DHomMatrix(-aSrcPos.getX(), -aSrcPos.getY()));
245 aTrans.scale(aDstSize.getWidth() / aSrcSize.getWidth(), aDstSize.getHeight() / aSrcSize.getHeight());
246 aTrans.translate(aDstPos.getX(), aDstPos.getY());
247
248 // transpose points to have smooth linear blending
250 aPoly2.append(::basegfx::B2DPoint(), nCnt);
251 sal_uInt32 nInd(ImpGetNearestIndex(aPoly1, aTrans * rBig.getB2DPoint(0)));
252
253 for(sal_uInt32 a(0); a < nCnt; a++)
254 {
255 aPoly2.setB2DPoint((a + nCnt - nInd) % nCnt, aPoly1.getB2DPoint(a));
256 }
257
258 aPoly2.setClosed(rBig.isClosed());
259 rSmall = aPoly2;
260}
261
263 const ::basegfx::B2DPolygon& rPoly,
264 const ::basegfx::B2DPoint& rPos
265)
266{
267 double fMinDist = 0.0;
268 sal_uInt32 nActInd = 0;
269
270 for(sal_uInt32 a(0); a < rPoly.count(); a++)
271 {
272 double fNewDist(::basegfx::B2DVector(rPoly.getB2DPoint(a) - rPos).getLength());
273
274 if(!a || fNewDist < fMinDist)
275 {
276 fMinDist = fNewDist;
277 nActInd = a;
278 }
279 }
280
281 return nActInd;
282}
283
289 const ::basegfx::B2DPolyPolygon& rBigger
290)
291{
292 while(rSmaller.count() < rBigger.count())
293 {
294 const ::basegfx::B2DPolygon& aToBeCopied(rBigger.getB2DPolygon(rSmaller.count()));
295 const ::basegfx::B2DRange aToBeCopiedPolySize(::basegfx::utils::getRange(aToBeCopied));
296 ::basegfx::B2DPoint aNewPoint(aToBeCopiedPolySize.getCenter());
297 ::basegfx::B2DPolygon aNewPoly;
298
299 const ::basegfx::B2DRange aSrcSize(::basegfx::utils::getRange(rBigger.getB2DPolygon(0)));
300 const ::basegfx::B2DPoint aSrcPos(aSrcSize.getCenter());
301 const ::basegfx::B2DRange aDstSize(::basegfx::utils::getRange(rSmaller.getB2DPolygon(0)));
302 const ::basegfx::B2DPoint aDstPos(aDstSize.getCenter());
303 aNewPoint = aNewPoint - aSrcPos + aDstPos;
304
305 for(sal_uInt32 a(0); a < aToBeCopied.count(); a++)
306 {
307 aNewPoly.append(aNewPoint);
308 }
309
310 rSmaller.append(aNewPoly);
311 }
312}
313
318 B2DPolyPolygonList_impl& rPolyPolyList3D,
319 bool bAttributeFade,
320 const SdrObject* pObj1,
321 const SdrObject* pObj2
322)
323{
324 Color aStartFillCol;
325 Color aEndFillCol;
326 Color aStartLineCol;
327 Color aEndLineCol;
328 ::tools::Long nStartLineWidth = 0;
329 ::tools::Long nEndLineWidth = 0;
330 SdrPageView* pPageView = mpView->GetSdrPageView();
331 SfxItemPool & rPool = pObj1->GetObjectItemPool();
333 SfxItemSet aSet2( aSet1 );
334 bool bLineColor = false;
335 bool bFillColor = false;
336 bool bLineWidth = false;
337 bool bIgnoreLine = false;
338 bool bIgnoreFill = false;
339
340 aSet1.Put(pObj1->GetMergedItemSet());
341 aSet2.Put(pObj2->GetMergedItemSet());
342
343 const drawing::LineStyle eLineStyle1 = aSet1.Get(XATTR_LINESTYLE).GetValue();
344 const drawing::LineStyle eLineStyle2 = aSet2.Get(XATTR_LINESTYLE).GetValue();
345 const drawing::FillStyle eFillStyle1 = aSet1.Get(XATTR_FILLSTYLE).GetValue();
346 const drawing::FillStyle eFillStyle2 = aSet2.Get(XATTR_FILLSTYLE).GetValue();
347
348 if ( bAttributeFade )
349 {
350 if ( ( eLineStyle1 != drawing::LineStyle_NONE ) && ( eLineStyle2 != drawing::LineStyle_NONE ) )
351 {
352 bLineWidth = bLineColor = true;
353
354 aStartLineCol = aSet1.Get(XATTR_LINECOLOR).GetColorValue();
355 aEndLineCol = aSet2.Get(XATTR_LINECOLOR).GetColorValue();
356
357 nStartLineWidth = aSet1.Get(XATTR_LINEWIDTH).GetValue();
358 nEndLineWidth = aSet2.Get(XATTR_LINEWIDTH).GetValue();
359 }
360 else if ( ( eLineStyle1 == drawing::LineStyle_NONE ) && ( eLineStyle2 == drawing::LineStyle_NONE ) )
361 bIgnoreLine = true;
362
363 if ( ( eFillStyle1 == drawing::FillStyle_SOLID ) && ( eFillStyle2 == drawing::FillStyle_SOLID ) )
364 {
365 bFillColor = true;
366 aStartFillCol = aSet1.Get(XATTR_FILLCOLOR).GetColorValue();
367 aEndFillCol = aSet2.Get(XATTR_FILLCOLOR).GetColorValue();
368 }
369 else if ( ( eFillStyle1 == drawing::FillStyle_NONE ) && ( eFillStyle2 == drawing::FillStyle_NONE ) )
370 bIgnoreFill = true;
371 }
372
373 if ( !pPageView )
374 return;
375
376 SfxItemSet aSet( aSet1 );
378 SdrObjList* pObjList = xObjGroup->GetSubList();
379 const size_t nCount = rPolyPolyList3D.size();
380 const double fStep = 1. / ( nCount + 1 );
381 const double fDelta = nEndLineWidth - nStartLineWidth;
382 double fFactor = fStep;
383
384 aSet.Put( XLineStyleItem( drawing::LineStyle_SOLID ) );
385 aSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) );
386
387 for ( size_t i = 0; i < nCount; i++, fFactor += fStep )
388 {
389 const ::basegfx::B2DPolyPolygon& rPolyPoly3D = rPolyPolyList3D[ i ];
392 SdrObjKind::Polygon,
393 rPolyPoly3D);
394
395 // line color
396 if ( bLineColor )
397 {
398 const basegfx::BColor aLineColor(basegfx::interpolate(aStartLineCol.getBColor(), aEndLineCol.getBColor(), fFactor));
399 aSet.Put( XLineColorItem( "", Color(aLineColor)));
400 }
401 else if ( bIgnoreLine )
402 aSet.Put( XLineStyleItem( drawing::LineStyle_NONE ) );
403
404 // fill color
405 if ( bFillColor )
406 {
407 const basegfx::BColor aFillColor(basegfx::interpolate(aStartFillCol.getBColor(), aEndFillCol.getBColor(), fFactor));
408 aSet.Put( XFillColorItem( "", Color(aFillColor)));
409 }
410 else if ( bIgnoreFill )
411 aSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) );
412
413 // line width
414 if ( bLineWidth )
415 aSet.Put( XLineWidthItem( nStartLineWidth + static_cast<::tools::Long>( fFactor * fDelta + 0.5 ) ) );
416
417 pNewObj->SetMergedItemSetAndBroadcast(aSet);
418
419 pObjList->InsertObject( pNewObj.get() );
420 }
421
422 if ( nCount )
423 {
424 pObjList->InsertObject(
425 pObj1->CloneSdrObject(pObj1->getSdrModelFromSdrObject()).get(),
426 0 );
427 pObjList->InsertObject(
428 pObj2->CloneSdrObject(pObj2->getSdrModelFromSdrObject()).get() );
429
431 mpView->InsertObjectAtView(xObjGroup.get(), *pPageView, SdrInsertFlags:: SETDEFLAYER);
432 }
433}
434
439 const ::basegfx::B2DPolyPolygon& rPolyPolyStart,
440 const ::basegfx::B2DPolyPolygon& rPolyPolyEnd,
441 double fMorphingFactor
442)
443{
444 ::basegfx::B2DPolyPolygon aNewPolyPolygon;
445 const double fFactor = 1.0 - fMorphingFactor;
446
447 for(sal_uInt32 a(0); a < rPolyPolyStart.count(); a++)
448 {
449 const ::basegfx::B2DPolygon& aPolyStart(rPolyPolyStart.getB2DPolygon(a));
450 const ::basegfx::B2DPolygon& aPolyEnd(rPolyPolyEnd.getB2DPolygon(a));
451 const sal_uInt32 nCount(aPolyStart.count());
452 ::basegfx::B2DPolygon aNewPolygon;
453
454 for(sal_uInt32 b(0); b < nCount; b++)
455 {
456 const ::basegfx::B2DPoint& aPtStart(aPolyStart.getB2DPoint(b));
457 const ::basegfx::B2DPoint& aPtEnd(aPolyEnd.getB2DPoint(b));
458 aNewPolygon.append(aPtEnd + ((aPtStart - aPtEnd) * fFactor));
459 }
460
461 aNewPolygon.setClosed(aPolyStart.isClosed() && aPolyEnd.isClosed());
462 aNewPolyPolygon.append(aNewPolygon);
463 }
464
465 return aNewPolyPolygon;
466}
467
472 const ::basegfx::B2DPolyPolygon& rPolyPoly1,
473 const ::basegfx::B2DPolyPolygon& rPolyPoly2,
474 const sal_uInt16 nSteps,
475 B2DPolyPolygonList_impl& rPolyPolyList3D
476)
477{
478 if(!nSteps)
479 return;
480
481 const ::basegfx::B2DRange aStartPolySize(::basegfx::utils::getRange(rPolyPoly1));
482 const ::basegfx::B2DPoint aStartCenter(aStartPolySize.getCenter());
483 const ::basegfx::B2DRange aEndPolySize(::basegfx::utils::getRange(rPolyPoly2));
484 const ::basegfx::B2DPoint aEndCenter(aEndPolySize.getCenter());
485 const ::basegfx::B2DPoint aDelta(aEndCenter - aStartCenter);
486 const double fFactor(1.0 / (nSteps + 1));
487 double fValue(0.0);
488
489 for(sal_uInt16 i(0); i < nSteps; i++)
490 {
491 fValue += fFactor;
492 ::basegfx::B2DPolyPolygon aNewPolyPoly2D = ImpCreateMorphedPolygon(rPolyPoly1, rPolyPoly2, fValue);
493
494 const ::basegfx::B2DRange aNewPolySize(::basegfx::utils::getRange(aNewPolyPoly2D));
495 const ::basegfx::B2DPoint aNewS(aNewPolySize.getCenter());
496 const ::basegfx::B2DPoint aRealS(aStartCenter + (aDelta * fValue));
497 const ::basegfx::B2DPoint aDiff(aRealS - aNewS);
498
500 rPolyPolyList3D.push_back( std::move(aNewPolyPoly2D) );
501 }
502}
503
504} // end of namespace sd
505
506/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
basegfx::BColor getBColor() const
virtual VclPtr< AbstractMorphDlg > CreateMorphDlg(weld::Window *pParent, const SdrObject *pObj1, const SdrObject *pObj2)=0
static SD_DLLPUBLIC SdAbstractDialogFactory * Create()
Definition: sdabstdlg.cxx:38
void BegUndo()
bool InsertObjectAtView(SdrObject *pObj, SdrPageView &rPV, SdrInsertFlags nOptions=SdrInsertFlags::NONE)
void EndUndo()
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
const SdrMarkList & GetMarkedObjectList() const
OUString const & GetDescriptionOfMarkedObjects() const
SdrObject * GetMarkedSdrObj() const
SdrObject * Next()
bool IsMore() const
virtual void InsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
SfxItemPool & GetObjectItemPool() const
SdrModel & getSdrModelFromSdrObject() const
virtual rtl::Reference< SdrObject > CloneSdrObject(SdrModel &rTargetModel) const=0
const SfxItemSet & GetMergedItemSet() const
SdrModel & getSdrModelFromSdrView() const
SdrPageView * GetSdrPageView() const
virtual void DeleteMarked()
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void translate(double fX, double fY)
void scale(double fX, double fY)
B2DPolygon const & getB2DPolygon(sal_uInt32 nIndex) const
void append(const B2DPolygon &rPolygon, sal_uInt32 nCount=1)
void setB2DPolygon(sal_uInt32 nIndex, const B2DPolygon &rPolygon)
void transform(const basegfx::B2DHomMatrix &rMatrix)
sal_uInt32 count() const
void setB2DPoint(sal_uInt32 nIndex, const basegfx::B2DPoint &rValue)
basegfx::B2DPoint const & getB2DPoint(sal_uInt32 nIndex) const
void append(const basegfx::B2DPoint &rPoint, sal_uInt32 nCount)
sal_uInt32 count() const
void setClosed(bool bNew)
double getLength() const
static void ImpMorphPolygons(const ::basegfx::B2DPolyPolygon &rPolyPoly1, const ::basegfx::B2DPolyPolygon &rPolyPoly2, const sal_uInt16 nSteps, B2DPolyPolygonList_impl &rPolyPolyList3D)
create morphed PolyPolygons
Definition: fumorph.cxx:471
static void ImpEqualizePolyPointCount(::basegfx::B2DPolygon &rSmall, const ::basegfx::B2DPolygon &rBig)
make the point count of the polygons equal in adding points
Definition: fumorph.cxx:229
static rtl::Reference< FuPoor > Create(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq)
Definition: fumorph.cxx:61
void ImpInsertPolygons(B2DPolyPolygonList_impl &rPolyPolyList3D, bool bAttributeFade, const SdrObject *pObj1, const SdrObject *pObj2)
create group object with morphed polygons
Definition: fumorph.cxx:317
::basegfx::B2DPolyPolygon ImpCreateMorphedPolygon(const ::basegfx::B2DPolyPolygon &rPolyPolyStart, const ::basegfx::B2DPolyPolygon &rPolyPolyEnd, double fMorphingFactor)
create single morphed PolyPolygon
Definition: fumorph.cxx:438
FuMorph(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq)
Definition: fumorph.cxx:51
static sal_uInt32 ImpGetNearestIndex(const ::basegfx::B2DPolygon &rPoly, const ::basegfx::B2DPoint &rPos)
Definition: fumorph.cxx:262
virtual void DoExecute(SfxRequest &rReq) override
Definition: fumorph.cxx:74
::std::vector< ::basegfx::B2DPolyPolygon > B2DPolyPolygonList_impl
Definition: fumorph.hxx:43
static void ImpAddPolys(::basegfx::B2DPolyPolygon &rSmaller, const ::basegfx::B2DPolyPolygon &rBigger)
add to a point reduced polys until count is same
Definition: fumorph.cxx:287
Base class for all functions.
Definition: fupoor.hxx:48
VclPtr< ::sd::Window > mpWindow
Definition: fupoor.hxx:146
::sd::View * mpView
Definition: fupoor.hxx:144
Base class of the stacked shell hierarchy.
Definition: ViewShell.hxx:92
An SdWindow contains the actual working area of ViewShell.
Definition: Window.hxx:45
int nCount
constexpr sal_uInt16 EE_ITEMS_END(EE_FEATURE_END)
constexpr sal_uInt16 EE_ITEMS_START(OWN_ATTR_VALUE_END+1)
uno_Any a
B2DHomMatrix createTranslateB2DHomMatrix(double fTranslateX, double fTranslateY)
B2DTuple interpolate(const B2DTuple &rOld1, const B2DTuple &rOld2, double t)
B2VectorOrientation
int i
::basegfx::B2DPolygon ImpGetExpandedPolygon(const ::basegfx::B2DPolygon &rCandidate, sal_uInt32 nNum)
Definition: fumorph.cxx:175
long Long
OUString SdResId(TranslateId aId)
Definition: sdmod.cxx:83
constexpr sal_uInt16 SDRATTR_START(XATTR_START)
constexpr sal_uInt16 SDRATTR_NOTPERSIST_FIRST(SDRATTR_CIRC_LAST+1)
RET_OK
constexpr TypedWhichId< XFillColorItem > XATTR_FILLCOLOR(XATTR_FILL_FIRST+1)
constexpr TypedWhichId< XLineColorItem > XATTR_LINECOLOR(XATTR_LINE_FIRST+3)
constexpr TypedWhichId< XLineWidthItem > XATTR_LINEWIDTH(XATTR_LINE_FIRST+2)
constexpr TypedWhichId< XLineStyleItem > XATTR_LINESTYLE(XATTR_LINE_FIRST)
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)