[Libreoffice-bugs] [Bug 125782] New: "current point" is not tracked when evaluate commands of custom shapes

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Jun 7 14:09:26 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=125782

            Bug ID: 125782
           Summary: "current point" is not tracked when evaluate commands
                    of custom shapes
           Product: LibreOffice
           Version: Inherited From OOo
          Hardware: x86-64 (AMD64)
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: LibreOffice
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: rb.henschel at t-online.de

Created attachment 152029
  --> https://bugs.documentfoundation.org/attachment.cgi?id=152029&action=edit
TearDrop shape with screenshot, how it looks in Word

The custom shapes are defined by the draw:enhanced-path attribute of the
<draw:enhanced-geometry> element in ODF. This path uses commands like lineto
and arcto. Some of the commands refer to "current point" as start of its
segment. In the current implementation such "current point" is not tracked.
That works as long as the coordinates of the "current point" are not needed for
the command itself.

But the quadratic Bézier curve is implemented, so that the equivalent cubic
Bézier  curve is used. And for getting the first control point the coordinates
of the start point are needed.

The current implementation assumes, that the "current point" is the previous
point in the point sequence. But that is wrong in case the previous command is
one of the several 'arc' commands. For those commands the last coordinate pair
represents an angle.

The error becomes visible in the "teardrop" shape. Is has a path with
'arcangleto' followed by 'quadraticcurveto'. See attachment.

I suggest to solve the problem by tracking the "current point" in
EnhancedCustomShape2d::CreateSubPath(). That has the advantage, that not only
command 'quadraticcurveto' can be implemented properly, but the command
'closepath' too.

-- 
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/20190607/ebff47c6/attachment.html>


More information about the Libreoffice-bugs mailing list