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

Context2D::createRadialGradient() doesn't create the correct gradient with color stops

    XMLWordPrintable

Details

    • be4c4877b35ad1b6983cf194e61f0dad1d123af5

    Description

      Steps to reproduce:

      • run the sample attached
      • observe the radial gradient from white to green
        EXPECTED: white center (radius: from 0 to 50), gradient from white to green (radius: from 50 to 100), green when radius > 100. (See 'Expected_Gradient.png')
        ACTUAL: continuous gradient from the center point outward. (See 'Actual_Gradient.png')

      The sample uses the code snippet found here: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/createRadialGradient

      Attachments

        1. Actual_Gradient.png
          Actual_Gradient.png
          21 kB
        2. Expected_Gradient.png
          Expected_Gradient.png
          31 kB
        3. qtbug67960.zip
          1 kB
        For Gerrit Dashboard: QTBUG-67960
        # Subject Branch Project Status CR V

        Activity

          People

            andysh Andy Shaw
            risto.sipola Risto Sipola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes