Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. painter.drawline() , overlapping opacity problems with 100% opaque pen.

painter.drawline() , overlapping opacity problems with 100% opaque pen.

Scheduled Pinned Locked Moved Unsolved General and Desktop
35 Posts 2 Posters 10.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kenchan
    wrote on last edited by
    #20

    So which Version of Qt are you using for this? I assume you are using Windows right?

    1 Reply Last reply
    0
    • GofferG Offline
      GofferG Offline
      Goffer
      wrote on last edited by Goffer
      #21

      I'm using Qt5 I think it's 5.6.1 and yes I'm on windows, will give it a try on MacOS
      I've tried in Qt 4.8.2 and it's exactly the same

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kenchan
        wrote on last edited by kenchan
        #22

        Hello @Goffer. I made a test app with a QGraphicsView using the same settings as you here are the results so far.
        Note: i did not bother to sub class a graphics item yet as I don't think it makes a difference.
        I don't see those artifacts at 1:1 zoom scale.
        zoom scale 1.0

        I do see those artifacts at less than a 1:1 zoom scale. I guess this is because the line thickness of on device pixel is now trying to show line a less than one physical device pixel width?? I think this is what the paint engine does when the device to logical pixels don't match, but I am no expert on that. You need to discuss those details with the developers.
        zoom scale 0.5

        I used Qt 5.8.0
        This is on macOS High Sierra 10.13
        I will try it on Windows later and let you know the results.

        Hope that helps :-)

        1 Reply Last reply
        0
        • K Offline
          K Offline
          kenchan
          wrote on last edited by kenchan
          #23

          Sorry but my images links are not showing up?? you will have to click on the links to see them I guess :-)

          1 Reply Last reply
          0
          • GofferG Offline
            GofferG Offline
            Goffer
            wrote on last edited by
            #24

            I've tried to make the pen cosmetic by setting the width to 0. That way the line should always have the same width on screen no matter the zoom factor. And the problem still occurs.

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kenchan
              wrote on last edited by
              #25

              hello again @Goffer
              I tried my test project on Windows and got the same results. It looks like we are stuck with that behaviour.
              You could always submit it as a bug.

              1 Reply Last reply
              0
              • GofferG Offline
                GofferG Offline
                Goffer
                wrote on last edited by
                #26

                I ve sent it to the interest mailing list as you suggested. Will see what happens, how could I submit it as a bug ?

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  kenchan
                  wrote on last edited by
                  #27

                  You can find out how to do that and much more here
                  also the wiki is a good place to look around for information.
                  The developers mailing list is here.

                  Good luck :-)

                  1 Reply Last reply
                  0
                  • GofferG Offline
                    GofferG Offline
                    Goffer
                    wrote on last edited by Goffer
                    #28

                    I've submited the bug ticket.

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      kenchan
                      wrote on last edited by
                      #29

                      what is the number of the bug report?

                      1 Reply Last reply
                      0
                      • GofferG Offline
                        GofferG Offline
                        Goffer
                        wrote on last edited by
                        #30

                        https://bugreports.qt.io/browse/QTBUG-63820

                        1 Reply Last reply
                        0
                        • K Offline
                          K Offline
                          kenchan
                          wrote on last edited by
                          #31

                          OK, got the link and voted for it.

                          1 Reply Last reply
                          0
                          • GofferG Offline
                            GofferG Offline
                            Goffer
                            wrote on last edited by
                            #32

                            lets see what happens ;)

                            GofferG 1 Reply Last reply
                            0
                            • GofferG Goffer

                              lets see what happens ;)

                              GofferG Offline
                              GofferG Offline
                              Goffer
                              wrote on last edited by
                              #33

                              @kenchan can you post your C++ example on the bug report ?
                              thx

                              1 Reply Last reply
                              0
                              • K Offline
                                K Offline
                                kenchan
                                wrote on last edited by
                                #34

                                OK. I added my comments and zip file to the bug report.

                                1 Reply Last reply
                                0
                                • GofferG Offline
                                  GofferG Offline
                                  Goffer
                                  wrote on last edited by
                                  #35

                                  thx ! hoppefully this will help, what do you think of the current "solution" ?

                                  1 Reply Last reply
                                  0

                                  • Login

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • Users
                                  • Groups
                                  • Search
                                  • Get Qt Extensions
                                  • Unsolved