Details

    • Proposal:
      Hide

      (1) Add following sentences to section 20.164 svg:stroke-linecap:

      For a dashed line, caps are applied to each dash. The values of the draw:dots1-length, draw:dots2-length and draw:distance attributes of the referenced <draw:stroke-dash> element refer to the dashes without cap.

      If the referenced <draw:stroke-dash> element has an attribute draw:style, the attribute draw:style is ignored.

      (2) In section 19.218.5 <draw:stroke-dash> add:

      This attribute is evaluated for a shape if its style does not contain an svg:stroke-linecap attribute.

      Show
      (1) Add following sentences to section 20.164 svg:stroke-linecap: For a dashed line, caps are applied to each dash. The values of the draw:dots1-length, draw:dots2-length and draw:distance attributes of the referenced <draw:stroke-dash> element refer to the dashes without cap. If the referenced <draw:stroke-dash> element has an attribute draw:style, the attribute draw:style is ignored. (2) In section 19.218.5 <draw:stroke-dash> add: This attribute is evaluated for a shape if its style does not contain an svg:stroke-linecap attribute.

      Description

      Copied from office-comment list

      Original author: Regina Henschel <rb.henschel@t-online.de>
      Original date: 11 Jan 2012 14:21:39
      Original URL: http://lists.oasis-open.org/archives/office-comment/201201/msg00000.html

      From the post:

      The element "<draw:stroke-dash>" (16.40.9) has an attribute "draw:style" (19.218.5). This attribute specifies a rendering for a stroke-dash using the values

      "rect: dash has a rectangular shape."
      and
      "round: dash has a round shape."

      On the other hand the ends of stroked subpaths can be set with the attribute "svg:stroke-linecap" (20.164) using the values butt, round, and square.

      It might be, that the settings are contradictory. For example draw:style sets "rect" and svg:stroke-linecap sets "round".

      I miss a rule to handle this inconsistence. Another solution would be to get rid of the attribute "draw:style" in this context.

        Attachments

          Activity

          Hide
          regina.henschel Regina Henschel added a comment -

          Set component to 'Graphics', so that the issue can be found by a search with filter 'Graphics'.

          Show
          regina.henschel Regina Henschel added a comment - Set component to 'Graphics', so that the issue can be found by a search with filter 'Graphics'.
          Hide
          patrick Patrick Durusau added a comment - - edited

          Patrick: https://issues.oasis-open.org/browse/OFFICE-3742
          Patrick: draw:style and svg:stroke-linecap set the end of line shape
          Patrick: variation between applications
          Patrick: need to be clear what happens when both are set on an line
          Patrick: applications use one or the other - LO svg, MS uses draw:style,
          Gnumeric - don't know - and there are other applications
          Patrick: Office-3742 - set to ODF 1.3
          Patrick: Regina will check on Caligra, other applications?

          12 Sept. 2016

          Show
          patrick Patrick Durusau added a comment - - edited Patrick: https://issues.oasis-open.org/browse/OFFICE-3742 Patrick: draw:style and svg:stroke-linecap set the end of line shape Patrick: variation between applications Patrick: need to be clear what happens when both are set on an line Patrick: applications use one or the other - LO svg, MS uses draw:style, Gnumeric - don't know - and there are other applications Patrick: Office-3742 - set to ODF 1.3 Patrick: Regina will check on Caligra, other applications? 12 Sept. 2016
          Hide
          regina.henschel Regina Henschel added a comment - - edited

          From the example document in https://beta.opendocumentformat.org/upload/de/165 and its rendering in various applications, I come to the conclusion, that the draw:style attribute of the element <draw:stroke-dash> is not used at all. Instead the applications apply the setting in attribute svg:stroke-linecap to the dashes too.

          Gnumeric 1.10.16 has dashed lines in charts. But it has no UI to style the line caps. In file it does not use svg:stroke-linecap. It writes draw:style="rect", but renders round caps.

          In theory the attribute draw:stroke-dash-names could be uses to apply a stroke with draw:style="rect" and another stroke with draw:style="round" for the same line. That will not be possible when the style of the dash is moved from in the definition of a <draw:stroke-dash> element to the svg:stroke-linecap attribute of the graphic style.

          The SVG specification has no explicit rule for rendering a dash in a dashed line, but the browsers apply the svg:stroke-linecap to the dashes too. You can test it with the attachment of my mail https://lists.oasis-open.org/archives/office/201707/msg00039.html

          OOXML has a similar property for lines. In Ecma Office Open XML Part 1 Fundamentals And Markup Language Reference.pdf:
          20.1.8.21 custDash for defining the Dash-Dots
          20.1.10.31 ST_LineCap (End Line Cap) for styling the line caps. It has the values "flat", "rnd" and "sq", which correspond to the values "butt", "round" and "square" in SVG.
          In this OOXML specification you find p.2928
          <quote>
          This simple type specifies how to cap the ends of lines. This also affects the ends of line segments for dashed
          lines.
          </quote>
          That means that there is no special setting for the dashes, but the line cap setting is used. This is the same behavior as seen in the browsers.

          Therefore I think, ODF should use this behavior too.
          The attribute draw:style is actually not used. But I will not remove it totally, because it might be useful in combination with attribute draw:stroke-dash-names, in case someone wants to implement it.

          Show
          regina.henschel Regina Henschel added a comment - - edited From the example document in https://beta.opendocumentformat.org/upload/de/165 and its rendering in various applications, I come to the conclusion, that the draw:style attribute of the element <draw:stroke-dash> is not used at all. Instead the applications apply the setting in attribute svg:stroke-linecap to the dashes too. Gnumeric 1.10.16 has dashed lines in charts. But it has no UI to style the line caps. In file it does not use svg:stroke-linecap. It writes draw:style="rect", but renders round caps. In theory the attribute draw:stroke-dash-names could be uses to apply a stroke with draw:style="rect" and another stroke with draw:style="round" for the same line. That will not be possible when the style of the dash is moved from in the definition of a <draw:stroke-dash> element to the svg:stroke-linecap attribute of the graphic style. The SVG specification has no explicit rule for rendering a dash in a dashed line, but the browsers apply the svg:stroke-linecap to the dashes too. You can test it with the attachment of my mail https://lists.oasis-open.org/archives/office/201707/msg00039.html OOXML has a similar property for lines. In Ecma Office Open XML Part 1 Fundamentals And Markup Language Reference.pdf: 20.1.8.21 custDash for defining the Dash-Dots 20.1.10.31 ST_LineCap (End Line Cap) for styling the line caps. It has the values "flat", "rnd" and "sq", which correspond to the values "butt", "round" and "square" in SVG. In this OOXML specification you find p.2928 <quote> This simple type specifies how to cap the ends of lines. This also affects the ends of line segments for dashed lines. </quote> That means that there is no special setting for the dashes, but the line cap setting is used. This is the same behavior as seen in the browsers. Therefore I think, ODF should use this behavior too. The attribute draw:style is actually not used. But I will not remove it totally, because it might be useful in combination with attribute draw:stroke-dash-names, in case someone wants to implement it.
          Hide
          mstahl Michael Stahl (Inactive) added a comment -
          Show
          mstahl Michael Stahl (Inactive) added a comment - resolved in TC meeting 2017-08-07 https://lists.oasis-open.org/archives/office/201708/msg00004.html
          Hide
          patrick Patrick Durusau added a comment -

          Applied OpenDocument-v1.3-wd08-part3-documents.odt

          Show
          patrick Patrick Durusau added a comment - Applied OpenDocument-v1.3-wd08-part3-documents.odt

            People

            • Assignee:
              Unassigned
              Reporter:
              rcweir Robert Weir (Inactive)
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: