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

Image bounds are not respected on export

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • QDS 4.3.2
    • QDS 3.2, QDS 3.5
    • Qt-Bridge-Figma
    • None

    Description

      If there is an invisible part of an image at the top of its bounding box, Plugin currently crops it away and uses only content part of the item. 
      It is the reason for some cases of misaligned images in generated qml and why completely invisible or empty items are rendered as 1x1 pixel images.
      It mostly breaks precise positioning of items.

      Case 1:
      Given: image item with 0 visibility and size of 200x200 pixels
      Expected: empty image file with size of 200x200
      Result: empty image file with size of 1x1

      Invisible images and items are exported as images with size of 1 by 1 pixel instead of their real size, it may effect scene "clickablity" in Design Studio, layout, anchoring and potentially items positioning in different states.

      Case 2: 

      Given: arc with 50% radius, empty in the upper half, size of 200x200. 
      Expected: image file with size of 200x200 and arc being positioned in a way that makes it look similar to the original design (respecting original bounding box)
      Result: image file with size of 100x200 and image being positioned in the same coordinates where the bounding box was, which makes arc appear higher than it should be by 100px (crops to content)

      Attachments

        Issue Links

          For Gerrit Dashboard: QDS-6785
          # Subject Branch Project Status CR V

          Activity

            People

              algerman Aleksei German
              algerman Aleksei German
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes