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. Source code of anti-aliasing of QPainter (QImage)
Forum Updated to NodeBB v4.3 + New Features

Source code of anti-aliasing of QPainter (QImage)

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 553 Views 1 Watching
  • 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.
  • MartinChan3M Offline
    MartinChan3M Offline
    MartinChan3
    wrote on last edited by
    #1

    I am doing some anti-aliasing drawing jobs, I want to know how qpainter(or qimage) do anti-aliasing when fill the polygon?but I can't find the related source code part, can anyone tell me the position of related function ?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      IIRC, what you are looking for is the QPaintEngine implementation. You might also want to check the new abstraction layer for Qt 6 called RHI.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      MartinChan3M 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        IIRC, what you are looking for is the QPaintEngine implementation. You might also want to check the new abstraction layer for Qt 6 called RHI.

        MartinChan3M Offline
        MartinChan3M Offline
        MartinChan3
        wrote on last edited by
        #3

        @SGaist Exactly and I can't find the QImage's implementation of QPaintEngine...I will try again.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          It's the other way around, QPaintEngine is used to draw. It does not have a backend using QImage.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          MartinChan3M 1 Reply Last reply
          0
          • SGaistS SGaist

            It's the other way around, QPaintEngine is used to draw. It does not have a backend using QImage.

            MartinChan3M Offline
            MartinChan3M Offline
            MartinChan3
            wrote on last edited by
            #5

            @SGaist It seems that (QRasterizer)[https://code.woboq.org/qt5/qtbase/src/gui/painting/qrasterizer.cpp.htm] is what I want. I used to doubt that QImage didn't use CPU but GPU(opengl) to render, but it seems not that way.

            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