Bug 144392 - Current point after "close path" command Z is the initial point of the closed path
Summary: Current point after "close path" command Z is the initial point of the closed...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
7.3.0.0 alpha0+
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Shapes-Custom
  Show dependency treegraph
 
Reported: 2021-09-08 23:42 UTC by Regina Henschel
Modified: 2023-08-13 09:48 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Command sequences Z L L and Z M L (12.60 KB, application/vnd.oasis.opendocument.graphics)
2021-09-08 23:42 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2021-09-08 23:42:43 UTC
Created attachment 174910 [details]
Command sequences Z L L and Z M L

Open attached document. It has two custom shapes. The used enhanced-path is cited on the right side.

The "close path" command Z makes the "current point" not invalid, but sets it to the initial point of the closed path. And following commands uses this as "current point" as long as they do not set themselves a "current point".

In the examples the closed path is the triangle. Its initial point has the coordinates (0|0). Therefore in shape A there should be a line from point (0|0) to point (80|60) which is the parameter of the first L (lineto) command.
Shape B does not have such line, because the command M (moveto) sets a "current point".

I think, there should be no concerns to fix it. This bug-report is not about the path object and its svg:d attribute, where users have a UI to manipulate points. But it is about the enhanced-path attribute of custom-shapes. The reported situation does not exists in import or export with predefined shapes. It happens only, if someone creates own custom-shapes by editing the markup in file or using macros.

Current ODF 1.3 is not explicit about current point after Z. But SVG, from which the path commands were inspired, has this rule and ODF 1.4 will have it explicitly too.
Comment 1 Xisco Faulí 2021-09-29 15:43:09 UTC
Moving to NEW