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. how to let VideoFrame paint from (0,0) when scale
Forum Updated to NodeBB v4.3 + New Features

how to let VideoFrame paint from (0,0) when scale

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 126 Views
  • 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.
  • Q Offline
    Q Offline
    Quiccz
    wrote on last edited by
    #1

    When I try to play a video with a resolution of 640x360 and set my video frame's painter rectangle to (0, 0, 512, 384) while using the aspect ratio mode 'KeepAspectRatio,' it appears to be centered. How can I make it start from (0, 0)?
    402540ee-e8d2-41bd-bab7-0f66e39bc0da-image.png
    11d0f2da-7b42-40bc-9fdf-e93faa44bb7d-image.png

    C 1 Reply Last reply
    0
    • Q Quiccz

      When I try to play a video with a resolution of 640x360 and set my video frame's painter rectangle to (0, 0, 512, 384) while using the aspect ratio mode 'KeepAspectRatio,' it appears to be centered. How can I make it start from (0, 0)?
      402540ee-e8d2-41bd-bab7-0f66e39bc0da-image.png
      11d0f2da-7b42-40bc-9fdf-e93faa44bb7d-image.png

      C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      @Quiccz Compute the size that the video should scale to with aspect ratio preserved then paint it (without Qt::KeepAspectRatio) using that size and not the frame dimension.

      1 Reply Last reply
      2
      • Q Quiccz has marked this topic as solved on

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved