[Libreoffice-bugs] [Bug 49319] EDITING: Cannot change a polygon point to Smooth Transition (see comment 17)
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Sun Apr 5 17:32:02 UTC 2020
https://bugs.documentfoundation.org/show_bug.cgi?id=49319
--- Comment #30 from Julien Nabet <serval2412 at yahoo.fr> ---
After some debugging on gdb, I noticed this part of bt:
#0 basegfx::getContinuity(basegfx::B2DVector const&, basegfx::B2DVector
const&) (rBackVector=..., rForwardVector=...) at
basegfx/source/vector/b2dvector.cxx:169
#1 0x00007fffec561661 in basegfx::B2DPolygon::getContinuityInPoint(unsigned
int) const (this=0x7e99400, nIndex=2) at
basegfx/source/polygon/b2dpolygon.cxx:1387
#2 0x00007ffff1be4c35 in ImplPolygon::ImplPolygon(basegfx::B2DPolygon const&)
(this=0x7ffffffeeb00, rPolygon=bezier curve basegfx::B2DPolygon = {...}) at
tools/source/generic/poly.cxx:414
0x00007ffff1beb7c9 in tools::Polygon::Polygon(basegfx::B2DPolygon const&)
(this=0x7ffffffeebb0, rPolygon=bezier curve basegfx::B2DPolygon = {...}) at
tools/source/generic/poly.cxx:1862
0x00007ffff35aec43 in XPolygon::XPolygon(basegfx::B2DPolygon const&)
(this=0x7ffffffeec50, rPolygon=bezier curve basegfx::B2DPolygon = {...}) at
svx/source/xoutdev/_xpoly.cxx:826
0x00007ffff35aef73 in XPolyPolygon::XPolyPolygon(basegfx::B2DPolyPolygon
const&) (this=0x7ffffffeed70, rPolyPolygon=open basegfx::B2DPolyPolygon with 1
sub-polygon(s) = {...})
at svx/source/xoutdev/_xpoly.cxx:855
#6 0x00007ffff3205f10 in SdrPathObj::AddToPlusHdlList(SdrHdlList&, SdrHdl&)
const (this=0x35c38c0, rHdlList=..., rHdl=...) at
svx/source/svdraw/svdopath.cxx:2006
"B2VectorContinuity::getContinuity" should return "B2VectorContinuity::C1"
but areParallel(rBackVector, rForwardVector) return false where it should
return true.
See
https://opengrok.libreoffice.org/xref/core/basegfx/source/vector/b2dvector.cxx?r=1d92933d#167
Here are the values retrieved (std::cerr << setprecision(15) << ...):
fValA=33122.8002951872
fValB=33122.8002951847
Here's the code of b2dvector.cxx::areParallel:
118 bool areParallel( const B2DVector& rVecA, const B2DVector& rVecB )
119 {
120 const double fValA(rVecA.getX() * rVecB.getY());
121 const double fValB(rVecA.getY() * rVecB.getX());
122
123 return fTools::equal(fValA, fValB);
124 }
See
https://opengrok.libreoffice.org/xref/core/basegfx/source/vector/b2dvector.cxx?r=1d92933d#118
Just "relaxing" a bit the equal comparison allows to return true in our case.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200405/c9f78e65/attachment-0001.htm>
More information about the Libreoffice-bugs
mailing list