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. Is it possible to invert Y on an instance of QPainter?
Forum Updated to NodeBB v4.3 + New Features

Is it possible to invert Y on an instance of QPainter?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 847 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.
  • SPlattenS Offline
    SPlattenS Offline
    SPlatten
    wrote on last edited by
    #1

    I have a widget which uses an offscreen image for painting then I copy the image to the visible display. I need to invert the vertical coordinate system, the offscreen image is 2000 pixels in height and the visible area is just 408.

    I have a scroll bar that controls what part of the offscreen image is transferred to the visible area, however the requirement is for the coordinate system to be inverted where 0,0 is bottom left.

    Is this possible to do with a transformation?

    Kind Regards,
    Sy

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @SPlatten said in Is it possible to invert Y on an instance of QPainter?:

      Is this possible to do with a transformation?

      Yes

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      SPlattenS 1 Reply Last reply
      3
      • Christian EhrlicherC Christian Ehrlicher

        @SPlatten said in Is it possible to invert Y on an instance of QPainter?:

        Is this possible to do with a transformation?

        Yes

        SPlattenS Offline
        SPlattenS Offline
        SPlatten
        wrote on last edited by SPlatten
        #3

        @Christian-Ehrlicher , thank you, found:

        https://stackoverflow.com/questions/4413570/use-window-viewport-to-flip-qpainter-y-axis

        Kind Regards,
        Sy

        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