Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
188ed98e
Kaydet (Commit)
188ed98e
authored
Tem 26, 2011
tarafından
Thomas Arnhold
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
callcatcher: remove unused methods
üst
5f24eddf
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
0 additions
and
133 deletions
+0
-133
b2dbeziertools.hxx
basegfx/inc/basegfx/curve/b2dbeziertools.hxx
+0
-1
b2dcubicbezier.hxx
basegfx/inc/basegfx/curve/b2dcubicbezier.hxx
+0
-16
b3dvector.hxx
basegfx/inc/basegfx/vector/b3dvector.hxx
+0
-13
b2dbeziertools.cxx
basegfx/source/curve/b2dbeziertools.cxx
+0
-31
b2dcubicbezier.cxx
basegfx/source/curve/b2dcubicbezier.cxx
+0
-59
b3dvector.cxx
basegfx/source/vector/b3dvector.cxx
+0
-13
No files found.
basegfx/inc/basegfx/curve/b2dbeziertools.hxx
Dosyayı görüntüle @
188ed98e
...
...
@@ -56,7 +56,6 @@ namespace basegfx
double
getLength
()
const
{
if
(
maLengthArray
.
size
())
return
maLengthArray
[
maLengthArray
.
size
()
-
1
];
else
return
0.0
;
}
double
distanceToRelative
(
double
fDistance
)
const
;
double
relativeToDistance
(
double
fRelative
)
const
;
};
}
// end of namespace basegfx
...
...
basegfx/inc/basegfx/curve/b2dcubicbezier.hxx
Dosyayı görüntüle @
188ed98e
...
...
@@ -202,22 +202,6 @@ namespace basegfx
sense to use reserve(4) at the vector as preparation.
*/
void
getAllExtremumPositions
(
::
std
::
vector
<
double
>&
rResults
)
const
;
/** Get optimum-split position on this segment
This method calculates the positions of all points of the segment
that have the maximimum distance to the corresponding line from
startpoint-endpoint. This helps to approximate the bezier curve
with a minimum number of line segments
@param fResults
Result positions are in the range ]0.0 .. 1.0[
Cubic beziers have at most two of these positions
@return
Returns the number of split positions found
*/
int
getMaxDistancePositions
(
double
fResults
[
2
])
const
;
};
}
// end of namespace basegfx
...
...
basegfx/inc/basegfx/vector/b3dvector.hxx
Dosyayı görüntüle @
188ed98e
...
...
@@ -233,19 +233,6 @@ namespace basegfx
*/
B3DVector
getPerpendicular
(
const
B3DVector
&
rNormalizedVec
)
const
;
/** get the projection of this Vector on the given Plane
@attention This only works if the given 3D Vector defining
the Plane is normalized.
@param rNormalizedPlane
A normalized 3D Vector defining a Plane.
@return
The projected 3D Vector
*/
B3DVector
getProjectionOnPlane
(
const
B3DVector
&
rNormalizedPlane
)
const
;
/** Calculate the Scalar product
This method calculates the Scalar product between this
...
...
basegfx/source/curve/b2dbeziertools.cxx
Dosyayı görüntüle @
188ed98e
...
...
@@ -126,37 +126,6 @@ namespace basegfx
return
(
static_cast
<
double
>
(
nIndex
)
+
fLinearInterpolatedLength
)
/
static_cast
<
double
>
(
mnEdgeCount
);
}
double
B2DCubicBezierHelper
::
relativeToDistance
(
double
fRelative
)
const
{
if
(
fRelative
<=
0.0
)
{
return
0.0
;
}
const
double
fLength
(
getLength
());
if
(
fTools
::
moreOrEqual
(
fRelative
,
1.0
))
{
return
fLength
;
}
// fRelative is in ]0.0 .. 1.0[
if
(
1
==
mnEdgeCount
)
{
// not a bezier, linear edge
return
fRelative
*
fLength
;
}
// fRelative is in ]0.0 .. 1.0[
const
double
fIndex
(
fRelative
*
static_cast
<
double
>
(
mnEdgeCount
));
double
fIntIndex
;
const
double
fFractIndex
(
modf
(
fIndex
,
&
fIntIndex
));
const
sal_uInt32
nIntIndex
(
static_cast
<
sal_uInt32
>
(
fIntIndex
));
const
double
fStartDistance
(
nIntIndex
?
maLengthArray
[
nIntIndex
-
1
]
:
0.0
);
return
fStartDistance
+
((
maLengthArray
[
nIntIndex
]
-
fStartDistance
)
*
fFractIndex
);
}
}
// end of namespace basegfx
//////////////////////////////////////////////////////////////////////////////
...
...
basegfx/source/curve/b2dcubicbezier.cxx
Dosyayı görüntüle @
188ed98e
...
...
@@ -1042,65 +1042,6 @@ namespace basegfx
}
}
int
B2DCubicBezier
::
getMaxDistancePositions
(
double
pResult
[
2
])
const
{
// the distance from the bezier to a line through start and end
// is proportional to (ENDx-STARTx,ENDy-STARTy)*(+BEZIERy(t)-STARTy,-BEZIERx(t)-STARTx)
// this distance becomes zero for at least t==0 and t==1
// its extrema that are between 0..1 are interesting as split candidates
// its derived function has the form dD/dt = fA*t^2 + 2*fB*t + fC
const
B2DPoint
aRelativeEndPoint
(
maEndPoint
-
maStartPoint
);
const
double
fA
=
(
3
*
(
maControlPointA
.
getX
()
-
maControlPointB
.
getX
())
+
aRelativeEndPoint
.
getX
())
*
aRelativeEndPoint
.
getY
()
-
(
3
*
(
maControlPointA
.
getY
()
-
maControlPointB
.
getY
())
+
aRelativeEndPoint
.
getY
())
*
aRelativeEndPoint
.
getX
();
const
double
fB
=
(
maControlPointB
.
getX
()
-
2
*
maControlPointA
.
getX
()
+
maStartPoint
.
getX
())
*
aRelativeEndPoint
.
getY
()
-
(
maControlPointB
.
getY
()
-
2
*
maControlPointA
.
getY
()
+
maStartPoint
.
getY
())
*
aRelativeEndPoint
.
getX
();
const
double
fC
=
(
maControlPointA
.
getX
()
-
maStartPoint
.
getX
())
*
aRelativeEndPoint
.
getY
()
-
(
maControlPointA
.
getY
()
-
maStartPoint
.
getY
())
*
aRelativeEndPoint
.
getX
();
// test for degenerated case: order<2
if
(
fTools
::
equalZero
(
fA
)
)
{
// test for degenerated case: order==0
if
(
fTools
::
equalZero
(
fB
)
)
return
0
;
// solving the order==1 polynomial is trivial
pResult
[
0
]
=
-
fC
/
(
2
*
fB
);
// test root and ignore it when it is outside the curve
int
nCount
=
((
pResult
[
0
]
>
0
)
&&
(
pResult
[
0
]
<
1
));
return
nCount
;
}
// derivative is polynomial of order 2
// check if the polynomial has non-imaginary roots
const
double
fD
=
fB
*
fB
-
fA
*
fC
;
if
(
fD
>=
0.0
)
// TODO: is this test needed? geometrically not IMHO
{
// calculate first root (avoiding a numerically unstable subtraction)
const
double
fS
=
sqrt
(
fD
);
const
double
fQ
=
-
(
fB
+
((
fB
>=
0
)
?
+
fS
:
-
fS
));
pResult
[
0
]
=
fQ
/
fA
;
// ignore root when it is outside the curve
static
const
double
fEps
=
1e-9
;
int
nCount
=
((
pResult
[
0
]
>
fEps
)
&&
(
pResult
[
0
]
<
fEps
));
// ignore root multiplicity
if
(
!
fTools
::
equalZero
(
fD
)
)
{
// calculate the other root
const
double
fRoot
=
fC
/
fQ
;
// ignore root when it is outside the curve
if
(
(
fRoot
>
fEps
)
&&
(
fRoot
<
1.0
-
fEps
)
)
pResult
[
nCount
++
]
=
fRoot
;
}
return
nCount
;
}
return
0
;
}
}
// end of namespace basegfx
// eof
...
...
basegfx/source/vector/b3dvector.cxx
Dosyayı görüntüle @
188ed98e
...
...
@@ -67,19 +67,6 @@ namespace basegfx
return
aNew
;
}
B3DVector
B3DVector
::
getProjectionOnPlane
(
const
B3DVector
&
rNormalizedPlane
)
const
{
B3DVector
aNew
(
*
this
);
aNew
=
cross
(
aNew
,
rNormalizedPlane
);
aNew
=
cross
(
aNew
,
rNormalizedPlane
);
aNew
.
mfX
=
mfX
-
aNew
.
mfX
;
aNew
.
mfY
=
mfY
-
aNew
.
mfY
;
aNew
.
mfZ
=
mfZ
-
aNew
.
mfZ
;
return
aNew
;
}
B3DVector
&
B3DVector
::
operator
*=
(
const
::
basegfx
::
B3DHomMatrix
&
rMat
)
{
const
double
fTempX
(
rMat
.
get
(
0
,
0
)
*
mfX
+
rMat
.
get
(
0
,
1
)
*
mfY
+
rMat
.
get
(
0
,
2
)
*
mfZ
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment