[Webkit-unassigned] [Bug 16805] Text on a path is all wonky

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 9 14:42:03 PST 2008


http://bugs.webkit.org/show_bug.cgi?id=16805





------- Comment #2 from zimmermann at kde.org  2008-01-09 14:42 PDT -------
Hey Oliver,

this is a known bug since ages. The root lies in Path.cpp, in following
function:
static void pathLengthApplierFunction(void* info, const PathElement* element)

quoting parts of the code here:

if ...   (traversalState.m_totalLength >= traversalState.m_desiredLength)) {
        FloatSize change = traversalState.m_current -
traversalState.m_previous;
        float slope = atan2f(change.height(), change.width());

        if (traversalState.m_action ==
PathTraversalState::TraversalPointAtLength) {
            float offset = traversalState.m_desiredLength -
traversalState.m_totalLength;
            traversalState.m_current.move(offset * cosf(slope), offset *
sinf(slope));

I can't exactly remember what the problem was, but it's related to the slope
calculation. We're really only doing a bad approimation of the actual "point at
length" (ie. gimme the path point at 30% of the path length). If the path
consisted of _one_ large curve segment, we're approximating _the whole_ segment
using a line, as you can see above - this doesn't make too much sense and
results in whacky layout....

Please fix :-)

Greetings,
Niko


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list