Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-75975

Context2D QML, unable to disable lineDash using setLineDash([])

    XMLWordPrintable

    Details

    • Platform/s:
      Linux/X11, Linux/Other display system

      Description

      If setLineDash is used at some point during a Canvas paint callback, all paths will use dashed lines. It's also unclear how the dash pattern can be disabled. setLineDash([]) should work as far as I know, but it does not here.

      setLineDash([99999999999999]) seems to be a temporary workaround at least for shorter paths.

      var c = getContext("2d");
      c.reset();
      c.beginPath();
      c.lineTo(100,100);
      c.stroke(); // gets the 5,5 pattern defined below!!! 
      
      c.beginPath();
      c.setLineDash([5,5]);
      c.lineTo(-100,-100);
      c.stroke(); // gets the 5,5 pattern
      
      c.beginPath();
      c.setLineDash([]);
      c.lineTo(13,14); // still the 5,5 pattern
      c.stroke(); 
      
      

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            olathorsen Ola Røer Thorsen
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes