HISE Logo Forum
    • Categories
    • Register
    • Login

    Mask does not scale properly on HiDPI or Retina display

    Scheduled Pinned Locked Moved Bug Reports
    17 Posts 8 Posters 1.5k Views
    Loading More Posts
    • 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.
    • C
      civet
      last edited by

      Is there any API for getting devicePixelRatio, or how to fix this issue in the C++ part?

      Screenshot 2022-04-19 at 3.22.33 PM.png

      I'm using an old retina MacbookPro. a simple snippet is here:

      HiseSnippet 1003.3ocsV01aaaCDlxNJHVaEXEX+.HxmjKxRk655JVwPayKtyaMIFQccCnnnfghxhHRjBTzIQan+m6+f1ijxQxodYcFX5CB5d+4Nd2QMUIorpJoB4M3U0kLj2W6GWKzY6mQ3BzjC.99wBdYISi1qtjTUwRPdd8egQr2fMP1mO7z8H4DAk0xBgdsjSYujWv0sbm9reimmOljvdEuni1O7YSnRw9xb4b.J88iPkD54jYriIF054i717vDtVph0DMqB4swdxj53L4kBm9ulWwOKmYHFghAG4XOVlmXPrgKZ+LddxzEobEB7xz1BPeWA3a8Ohmvuleag3arBvsVzsd30aY30eI3M5eBdq.RdcfzFNHcW+XphWpakXvyW4OQnYpTBT16BEmtnd0882WBZHz6VPNmMVADWaQ3ihh1ACuF9jf.nzWowWPTXJQbAoB+y3EVRRRlRDr7vsch1dGLXmwpEZTwL3pjozbVEDjheM9ji6n9eGLX6q19mvif.BeV294k7DcVKYFiOKS2RelTkvTw7+hA75v4TRBedkgWv6uA54JZNqC5oJFbbLknyBAMchMozyUzv2DsqISLuF075s1j6HP8cmNAeO7Crt2lH1zD5DzmJmq4BVX5bAUykhvYCCfTzDdBDMH3uIx5FcFuZ2YL8eXxxvgsL9EadFN7sOIXPvf6eebEzlfujqXoJnaOXvLSvbyBgQWMFdhhrGTfjDE4xSYTcnIXVPObI2nyX3RHAvxzlxwp7m4o0e15iS4cveteSgIVLAqfnBnDbsIFMk5BR04F2bFaFW7RRMSElRxqXNm2MrONpaXM975zvwhTVlWeD3ua.kN9iIRbw.Hgi9EGAXo3XolchHzdTD79.7MEkltRYl9DkLO23xUH1riRcaFFJlWbFSsCz8kOmcshvf6xaC17Kaa.0011QQoXhfqOoj0Pe6qyPM88vW+9jCHZhYcRCu1YTf2ArKfcytkKC7OfUctVVZ0snTJLdvaKsU5cVr5wrD.wgPukuah.cEX6lIMK6q6RXGr6xvMZ2kS6vsgKZIttA7t7Qe9NQXarLYdNQu7JZy8RMBfSpk1KZ18Ip355t2a8eXuczst29KEh20eJWSyVMF6sBLBmg+efwla6ti+goovfXK.2ve7ettWs8uDd2tyYvBVEG5d7OddQLrcfxfnKf9Kv49d8L8wN5HCsoBDCS9VhOBOMBGYn8ZDNZgPTAgpjui5lOM2mtkkCfIg8WIF3ejgFOBYmYA67g6.PEvU6uiRMo+2AiVq1lGrF178qgMObMr4GVCadzZXyOtF173a0FyeU874ZYgab.XL8P6xKOuCEDnyx1Eh9DHh84iA
      
      ustkU 1 Reply Last reply Reply Quote 0
      • ustkU
        ustk @civet
        last edited by

        @civet This issue is here for a long time and I've opened an issue:
        https://github.com/christophhart/HISE/issues/269
        https://forum.hise.audio/topic/4851/zoom-factor-offsets-graphics-effects/10

        As soon as you use a layer, interface zoom factors other than 100% are messing up the scale

        Can't help pressing F5 in the forum...

        d.healeyD 1 Reply Last reply Reply Quote 0
        • d.healeyD
          d.healey @ustk
          last edited by

          @ustk Does Content.setUseHighResolutionForPanels(true); make any difference?

          Libre Wave - Freedom respecting instruments and effects
          My Patreon - HISE tutorials
          YouTube Channel - Public HISE tutorials

          NatanN ustkU 2 Replies Last reply Reply Quote 0
          • NatanN
            Natan @d.healey
            last edited by Natan

            @d-healey said in Mask does not scale properly on HiDPI or Retina display:

            @ustk Does Content.setUseHighResolutionForPanels(true); make any difference?

            Is this Unique to Develop Branch?

            d.healeyD 1 Reply Last reply Reply Quote 0
            • ustkU
              ustk @d.healey
              last edited by

              @d-healey It does not seem to be related, or at least it does not solve the problem

              Can't help pressing F5 in the forum...

              1 Reply Last reply Reply Quote 1
              • d.healeyD
                d.healey @Natan
                last edited by

                @Natan I don't know, I don't use Master branch :p

                Libre Wave - Freedom respecting instruments and effects
                My Patreon - HISE tutorials
                YouTube Channel - Public HISE tutorials

                ustkU 1 Reply Last reply Reply Quote 1
                • ustkU
                  ustk @d.healey
                  last edited by

                  @d-healey I think the paint routine does take into account the zoom factor, but the layer part might miss this rescaling somehow. I'll have another look at the source but I'm not confident I can find anything...

                  Can't help pressing F5 in the forum...

                  1 Reply Last reply Reply Quote 1
                  • whoopsydoodleW
                    whoopsydoodle
                    last edited by

                    Is there an update to this in 2024?

                    It seems to still be an issue. I'm using a mask and even just zooming the view in and out inside hise, the mask keeps it's absolute pixel dimensions, completely moving around within my interface relative to everything else. This bug makes using masks completely pointless.

                    A 1 Reply Last reply Reply Quote 0
                    • A
                      aaronventure @whoopsydoodle
                      last edited by

                      @whoopsydoodle nope, still a bug. You could refer to the scaling ratio as a dimensions modifier when drawing your mask.

                      Though that's only a bandaid.

                      1 Reply Last reply Reply Quote 0
                      • P
                        prehm
                        last edited by

                        does this mean masks are basically unusable?
                        i really need this feature..

                        ustkU 1 Reply Last reply Reply Quote 0
                        • ustkU
                          ustk @prehm
                          last edited by

                          @prehm Unfortunately yes, like blur and maybe some other graphic functions...

                          Can't help pressing F5 in the forum...

                          P 1 Reply Last reply Reply Quote 0
                          • P
                            prehm @ustk
                            last edited by prehm

                            @ustk
                            That’s a bummer.
                            What’s wrong with blur? Seemed fine the one time I tried it

                            ustkU A 2 Replies Last reply Reply Quote 0
                            • ustkU
                              ustk @prehm
                              last edited by

                              @prehm Very CPU heavy like shadows, except text shadow because it uses a different algorithm that we wait to be applied to other functions. I think the blur has a strange behaviour when scaling too...

                              Can't help pressing F5 in the forum...

                              1 Reply Last reply Reply Quote 0
                              • A
                                aaronventure @prehm
                                last edited by aaronventure

                                @prehm It uses the old JUCE routine for drawing blur, which is about 100x slower than the melatonin version that HISE is still missing, and it's still done on the CPU.

                                If you want fancy graphics and visual effects, use a WebView and enjoy all the modern frontend tech.

                                P 1 Reply Last reply Reply Quote 1
                                • P
                                  prehm @aaronventure
                                  last edited by

                                  @aaronventure
                                  Cool, thanks for the hint.
                                  I am new to programming so I‘ll have to read into that..

                                  Christoph HartC 1 Reply Last reply Reply Quote 0
                                  • Christoph HartC
                                    Christoph Hart @prehm
                                    last edited by

                                    It uses the old JUCE routine for drawing blur, which is about 100x slower than the melatonin version that HISE is still missing, and it's still done on the CPU.

                                    FYI, I have replaced the shadow functions in the scripting Graphics object with the melatonin routines in the upcoming batch of commits.

                                    But if you want to be 100% accurate, the melatonin shadow is also rendered on the CPU but it's highly optimized withs lots of dirty tricks. The default JUCE implementation (or my failed attempt of replacing it with another algorithm) is just unoptimized code.

                                    ustkU 1 Reply Last reply Reply Quote 2
                                    • ustkU
                                      ustk @Christoph Hart
                                      last edited by

                                      @Christoph-Hart So the shadow is optimised, but not yet the blur, right?

                                      Can't help pressing F5 in the forum...

                                      1 Reply Last reply Reply Quote 0
                                      • First post
                                        Last post

                                      14

                                      Online

                                      1.8k

                                      Users

                                      11.9k

                                      Topics

                                      103.9k

                                      Posts