Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-4835

Implement mirror functionality for QML items

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None
    • None

    Description

      Make it possible to flip/mirror items horizontal/vertical. See the attached demo project.

      function flipH(flip : bool, width : real) {
          if (flip)
              root.flipHorizontalMat = Qt.matrix4x4(-1, 0, 0, width,
                                                      0, 1, 0, 0,
                                                      0, 0, 1, 0,
                                                      0, 0, 0, 1)
          else
              root.flipHorizontalMat = Qt.matrix4x4()
      }
      
      function flipV(flip : bool, height : real) {
          if (flip)
              root.flipVerticalMat = Qt.matrix4x4(1, 0, 0, 0,
                                                  0, -1, 0, height,
                                                  0, 0, 1, 0,
                                                  0, 0, 0, 1)
          else
              root.flipVerticalMat = Qt.matrix4x4()
      }
      

      Attachments

        1. Flipped_Assets_Test.metadata
          7 kB
          Peter Rohles
        2. Flipped_Assets_Test.qtbridge
          31 kB
          Peter Rohles
        3. image-2022-11-22-15-05-40-001.png
          162 kB
          Peter Rohles
        4. image-2022-11-22-15-07-56-029.png
          136 kB
          Peter Rohles
        5. untitledMirror.zip
          5 kB
          Henning Gründl

        Activity

          People

            henning Henning Gründl
            henning Henning Gründl
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: