Reply to post

Windows 11 rounded corner on HiDPI displays

Author
leowang
User
  • Total Posts : 0
  • Scores: 0
  • Reward points: 0
  • Joined: 2022/01/10 22:49:32
  • Status: offline
2022/01/11 11:31:02 (permalink)
0

Windows 11 rounded corner on HiDPI displays

In Windows 11, HyperSnap captures window with rounded corner, but in scaled mode, e.g., 200% or 250% zoom level, HyperSnap captures the window corner with a smaller radius, thus leaving a rounded edge which consists of:
 
A white corner
+
Background content inside a rounder corner with smaller radius
+
Window content
 
I can't upload the screenshot file directly. Here is the imgbb viewer link:
 
https://ibb.co/Ptz671F
 
Please check, thank you.

10 Replies Related Threads

    Admin
    Administrator
    • Total Posts : 275
    • Scores: 6
    • Reward points: 0
    • Joined: 2010/11/22 00:00:00
    • Location: USA
    • Status: offline
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/11 15:44:15 (permalink)
    0
    Thank you for letting me know! I'll see what I can do about this. Unfortunately there is no way to know programmatically what the exact shape of the window is under Windows 11 system, so I'll have to guess. There are also some windows that don't have round corners, and again there is no way for me to know about it from within the program code. Maybe there should be an option in HyperSnap to try to guess and capture the rounded corners, or just capture a rectangular region, depending on users' preferences.
     
    Greg
    leowang
    User
    • Total Posts : 0
    • Scores: 0
    • Reward points: 0
    • Joined: 2022/01/10 22:49:32
    • Status: offline
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/12 06:08:49 (permalink)
    0
    The dimensions are well documented. Please take a look at
     
    https://docs.microsoft.com/en-us/windows/apps/design/signature-experiences/geometry
     
    For example, the value of the radius of the rounded corners of the top-level windows, it is 8 * PPI_Of_Current_Display / 96.
     
    An option that switches between a rectangular and a rounded window is a good idea.
    Admin
    Administrator
    • Total Posts : 275
    • Scores: 6
    • Reward points: 0
    • Joined: 2010/11/22 00:00:00
    • Location: USA
    • Status: offline
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/13 13:27:22 (permalink)
    0
    Please check version 8.20, just posted on this web site, hopefully it will work better for you.
     
    Greg
    leowang
    User
    • Total Posts : 0
    • Scores: 0
    • Reward points: 0
    • Joined: 2022/01/10 22:49:32
    • Status: offline
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/14 10:40:55 (permalink)
    0
    I upgraded to 8.20. HyperSnap seems like not DPI-aware and the snapped pictures are the same as before: the rounded corner still contains the background color.
     
    The screenshot: https://ibb.co/Vw1v3pQ
     
    Admin
    Administrator
    • Total Posts : 275
    • Scores: 6
    • Reward points: 0
    • Joined: 2010/11/22 00:00:00
    • Location: USA
    • Status: offline
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/14 15:56:33 (permalink)
    0
    I only see some black pixels on your screenshot and don't understand what exactly was captured and on which monitor, what was its resolution etc. You may need to make the background pixels transparent under HyperSnap's Capture Settings screen.
    leowang
    User
    • Total Posts : 0
    • Scores: 0
    • Reward points: 0
    • Joined: 2022/01/10 22:49:32
    • Status: offline
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/14 21:06:46 (permalink)
    0
    The screenshot is about the DPI-awareness: you can see the resolution of the background program (the chessboard, the pieces and the texts on the ribbon bar are all sharp) and HyperSnap's buttons and texts are coarse.
     
    In 8.19 HyperSnap's interface is fine.
    leowang
    User
    • Total Posts : 0
    • Scores: 0
    • Reward points: 0
    • Joined: 2022/01/10 22:49:32
    • Status: offline
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/14 21:27:01 (permalink)
    0
    This is what HyperSnap captured in Window mode: https://ibb.co/NsTb7gM
     
    This is my desktop: https://ibb.co/sVCGst5
     
    As you can see, the left corner also contains part of the Acrobat Reader icon.
    leowang
    User
    • Total Posts : 0
    • Scores: 0
    • Reward points: 0
    • Joined: 2022/01/10 22:49:32
    • Status: offline
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/14 22:31:24 (permalink)
    0
    Windows 11's renderer blends the window border with the background content, I think there are two options to get the accurate window bitmap:
     
    1. Use DwmSetWindowAttribute API to prevent the window be rounded.
     
    https://docs.microsoft.com/en-us/windows/win32/api/dwmapi/nf-dwmapi-dwmsetwindowattribute
     
    This is the best option IMO.
     
    2. Create a pure white borderless window just under the window to capture to prevent any bitmap blending. This will leave a gray rounded margin outside the window rounded corner: the alpha mask layer, see the screenshot.
     
    https://ibb.co/NY2mVGN
     
    A pure black background seems to have better effect
     
    https://ibb.co/mNnB8Tm
     
    but there are several white pixels on the top-left corner, I think it is a HyperSnap bug: the flashing rectangle remains some pixels there.
    Admin
    Administrator
    • Total Posts : 275
    • Scores: 6
    • Reward points: 0
    • Joined: 2010/11/22 00:00:00
    • Location: USA
    • Status: offline
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/15 14:14:02 (permalink)
    0
    I use the background approach for now, although maybe giving the user an option to choose - capture rounder corners or not - would be useful too. As for the color - white, black, any other or transparent - you may set it under HyperSnap "Capture Settings" button - Capture tab.
     
    The trick is to get right the corner radius, taking into account each monitor dpi resolution and scaling. Maybe this time I got it right, if you want, try ver. 8.20.01, just posted to this web site.
     
    Greg
    leowang
    User
    • Total Posts : 0
    • Scores: 0
    • Reward points: 0
    • Joined: 2022/01/10 22:49:32
    • Status: offline
    ➥ Approval Pending
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/15 15:09:49 (permalink)
    #11
    Jump to:
    © 2022 APG vNext Commercial Version 5.1