56 case css::awt::GradientStyle_LINEAR :
66 aStartPos = aEndPos + (aFullVec * fLen);
74 aStartPos *= aTransformation;
75 aEndPos *= aTransformation;
79 case css::awt::GradientStyle_AXIAL :
89 aEndPos = aStartPos + (aFullVec * fLen);
97 aStartPos *= aTransformation;
98 aEndPos *= aTransformation;
102 case css::awt::GradientStyle_RADIAL :
103 case css::awt::GradientStyle_SQUARE :
113 aStartPos = aEndPos + (aFullVec * fLen);
121 aStartPos *= aTransformation;
122 aEndPos *= aTransformation;
131 aStartPos += aOffset;
137 case css::awt::GradientStyle_ELLIPTICAL :
138 case css::awt::GradientStyle_RECT :
148 aStartPos = aEndPos + (aFullVec * fLen);
156 aStartPos *= aTransformation;
157 aEndPos *= aTransformation;
166 aStartPos += aOffset;
183 bool bMoveSingle,
bool bMoveFirst)
213 case css::awt::GradientStyle_LINEAR :
215 if(!bMoveSingle || !bMoveFirst)
221 aFullVec = aEndPos - aCenter;
227 fNewFullAngle *= -10.0;
228 fNewFullAngle += 900.0;
231 while(fNewFullAngle < 0.0)
233 fNewFullAngle += 3600.0;
236 while(fNewFullAngle >= 3600.0)
238 fNewFullAngle -= 3600.0;
250 if(!bMoveSingle || bMoveFirst)
256 const double fFullLen(aFullVec.
getLength());
257 const double fOldLen(aOldVec.
getLength());
258 const double fNewBorder((fFullLen * 100.0) / fOldLen);
259 sal_Int32 nNewBorder(100 -
FRound(fNewBorder));
281 case css::awt::GradientStyle_AXIAL :
283 if(!bMoveSingle || !bMoveFirst)
287 const double fFullLen(aFullVec.
getLength());
288 const double fOldLen(aOldVec.
getLength());
289 const double fNewBorder((fFullLen * 100.0) / fOldLen);
290 sal_Int32 nNewBorder = 100 -
FRound(fNewBorder);
311 fNewFullAngle *= -10.0;
312 fNewFullAngle += 900.0;
315 while(fNewFullAngle < 0.0)
317 fNewFullAngle += 3600.0;
320 while(fNewFullAngle >= 3600.0)
322 fNewFullAngle -= 3600.0;
336 case css::awt::GradientStyle_RADIAL :
337 case css::awt::GradientStyle_SQUARE :
339 if(!bMoveSingle || !bMoveFirst)
352 if(nNewXOffset > 100)
362 if(nNewYOffset > 100)
370 aStartPos -= aOffset;
374 if(!bMoveSingle || bMoveFirst)
380 const double fFullLen(aFullVec.
getLength());
381 const double fOldLen(aOldVec.
getLength());
382 const double fNewBorder((fFullLen * 100.0) / fOldLen);
383 sal_Int32 nNewBorder(100 -
FRound(fNewBorder));
406 fNewFullAngle *= -10.0;
407 fNewFullAngle += 900.0;
410 while(fNewFullAngle < 0.0)
412 fNewFullAngle += 3600.0;
415 while(fNewFullAngle >= 3600.0)
417 fNewFullAngle -= 3600.0;
431 case css::awt::GradientStyle_ELLIPTICAL :
432 case css::awt::GradientStyle_RECT :
434 if(!bMoveSingle || !bMoveFirst)
447 if(nNewXOffset > 100)
457 if(nNewYOffset > 100)
465 aStartPos -= aOffset;
469 if(!bMoveSingle || bMoveFirst)
475 const double fFullLen(aFullVec.
getLength());
476 const double fOldLen(aOldVec.
getLength());
477 const double fNewBorder((fFullLen * 100.0) / fOldLen);
478 sal_Int32 nNewBorder(100 -
FRound(fNewBorder));
501 fNewFullAngle *= -10.0;
502 fNewFullAngle += 900.0;
505 while(fNewFullAngle < 0.0)
507 fNewFullAngle += 3600.0;
510 while(fNewFullAngle >= 3600.0)
512 fNewFullAngle -= 3600.0;
basegfx::BColor getBColor() const
basegfx::BGradient aGradient
basegfx::B2DPoint maPositionA
basegfx::B2DPoint maPositionB
virtual const tools::Rectangle & GetSnapRect() const
B2DPoint getMaximum() const
B2DPoint getCenter() const
void replaceEndColor(const BColor &rEnd)
void replaceStartColor(const BColor &rStart)
sal_uInt16 GetBorder() const
sal_uInt16 GetStartIntens() const
void SetColorStops(const basegfx::BColorStops &rSteps)
void SetEndIntens(sal_uInt16 nNewIntens)
void SetYOffset(sal_uInt16 nNewOffset)
void SetXOffset(sal_uInt16 nNewOffset)
sal_uInt16 GetXOffset() const
void SetBorder(sal_uInt16 nNewBorder)
const basegfx::BColorStops & GetColorStops() const
sal_uInt16 GetEndIntens() const
Degree10 GetAngle() const
css::awt::GradientStyle GetGradientStyle() const
void SetStartIntens(sal_uInt16 nNewIntens)
void SetAngle(Degree10 nNewAngle)
sal_uInt16 GetYOffset() const
tools::Long FRound(double fVal)
B2DHomMatrix createRotateAroundPoint(double fPointX, double fPointY, double fRadiant)
constexpr double rad2deg(double v)