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

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              henning Henning Gründl
              henning Henning Gründl
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes