25#include <osl/diagnose.h>
37 : m_sqrtElements( static_cast<sal_Int32>(
38 sqrt( static_cast<double>(
nElements) ) ) ),
39 m_elementEdge( 1.0 / m_sqrtElements ),
49 const sal_Int32 line_ =
static_cast<sal_Int32
>(area) /
m_sqrtElements;
50 const double line = ::basegfx::pruneScaleValue(
52 const double col = ::basegfx::pruneScaleValue(
55 if (! ::basegfx::fTools::equalZero(
line )) {
64 if (! ::basegfx::fTools::equalZero(
col ))
67 if ((line_ & 1) == 1) {
86 double t,
bool in )
const
92 const double edge = ::basegfx::pruneScaleValue(
93 std::trunc(sqrtArea2) /
97 if (! ::basegfx::fTools::equalZero( edge )) {
106 const double len =
t * M_SQRT2 *
d;
107 const double height = ::basegfx::pruneScaleValue( M_SQRT1_2 /
m_sqrtElements );
116 if ((
static_cast<sal_Int32
>(sqrtArea2) & 1) == 1)
125 aTransform.
rotate( -M_PI_4 );
135 const double edge = ::basegfx::pruneScaleValue(
136 std::trunc(sqrtArea2) /
140 if (! ::basegfx::fTools::equalZero( edge )) {
150 const double len = (1.0 -
t) * M_SQRT2 *
d;
151 const double height = ::basegfx::pruneScaleValue( M_SQRT1_2 /
m_sqrtElements );
160 if ((
static_cast<sal_Int32
>(sqrtArea2) & 1) == 1)
164 aTransform.
rotate( M_PI_2 + M_PI_4 );
208 aTransform.
rotate( M_PI_2 );
216 aTransform.
rotate( M_PI );
226 aTransform.
rotate( M_PI_2 );
void rotate(double fRadiant)
void translate(double fX, double fY)
void append(const B2DPolygon &rPolygon, sal_uInt32 nCount=1)
void transform(const basegfx::B2DHomMatrix &rMatrix)
void transform(const basegfx::B2DHomMatrix &rMatrix)
void append(const basegfx::B2DPoint &rPoint, sal_uInt32 nCount)
void setClosed(bool bNew)
virtual ::basegfx::B2DPolyPolygon operator()(double t) override
Retrieve the poly-polygon for value t.
virtual ::basegfx::B2DPolyPolygon operator()(double t) override
Retrieve the poly-polygon for value t.
const double m_elementEdge
::basegfx::B2DPolyPolygon calcSnake(double t) const
::basegfx::B2DPolyPolygon calcHalfDiagonalSnake(double t, bool in) const
SnakeWipe(sal_Int32 nElements, bool diagonal, bool flipOnYAxis)
const sal_Int32 m_sqrtElements
RttiCompleteObjectLocator col
B2DHomMatrix createScaleB2DHomMatrix(double fScaleX, double fScaleY)
B2DHomMatrix createTranslateB2DHomMatrix(double fTranslateX, double fTranslateY)
B2DHomMatrix createRotateB2DHomMatrix(double fRadiant)
constexpr T & temporary(T &&x)
::basegfx::B2DPolyPolygon flipOnYAxis(::basegfx::B2DPolyPolygon const &polypoly)
Flips on Y-axis:
::basegfx::B2DPolyPolygon flipOnXAxis(::basegfx::B2DPolyPolygon const &polypoly)
Flips on X-axis: