HISE Logo Forum
    • Categories
    • Register
    • Login

    Arc slider

    Scheduled Pinned Locked Moved General Questions
    23 Posts 5 Posters 716 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.
    • ulrikU
      ulrik @udalilprofile
      last edited by

      @udalilprofile as @ustk already showed you, but you can also make circular gradients with several colours, see this example

      g.setGradientFill([Colours.green , a[2], a[3], Colours.red, 0, 0, false, Colours.white, 0.5]);
      

      the "false" statement means "linear" gradient, "true" will set the gradient to "circular gradient"
      and you can add more colours (both for linear and circular versions)

      see the docs here:
      https://docs.hise.audio/scripting/scripting-api/graphics/index.html#setgradientfill

      Skärmavbild 2024-12-18 kl. 18.17.58.png

      HiseSnippet 1148.3ocsWstSibCE1CvTsSZQpqTe.FE0eLTgfbiPZQUMK21h5BaDY6pJgVsqiGOYbwwNx1CPTER8QouF8spuAsGOSByD1DtjBiPg3yEe9NG646bRGkjP0ZoB4T5ciFRQNeka2QBS7dwXl.cz9HmUcesBGxnBi1uFZ2QCwZMMD43r7qsl33sBJ84e9ocwbrfPyEgPuWxHz2vFvL4R6z9WXb9g3P56XCJXci1GQjh8jbYB.mkcqfFhImi6SOAaMaIWzOi0wHmuyMrZipQsH3lsp1nFgTq01099sITbTDsY0s1tQqnFQXRkZHmu3fPlQp5ZvFpF4rxtxvQcikWJxBv6YZVON0tnJpKD4LwGJ4g1TzJEsWLiG1YRcRifcoSdUa4rp123dLKjci77p2WmpvO2ihEPmklFdKOE7pVDdUJ.uY.ImBPZkLH8R2tDEanIWiEOeo6QBCUAkG5TPIyVzR+sq6dRvBgYiA3yoGpfE23QPyJUV2G9XscJUBNqzF+NXAkq8+Q+Id0mZdEmumbvPovdmInbpIkK3xof4QIBhgIEA8WqzeTx6BrxGChMwLscKdijf46JSDg5.az75uQDboA14fxUtJJpd5icS8J4oujYHw9ASbNnLKr7ZqUxC1XOBVS8yvP0x+f2la5yYBJDt9iuUC1.6tlZlbM+PHPAmkcOTuAIFqLJZhlttekz+lnQpvh9TEMbce7Y09f8y5vmQXtl9AKx775on3y2YZTTalnvGxgXenj4Suxnv9jzfbOXquhRE9SG9I5RwUFfSQTtlKiYFaxrwV2AJqmhROBSQ3I7Gd4pGOglAnMqkAI6+mAnLpj6pJ0XdwegJTOJTc6S36qTs0cbfZhginoPp948Lsdtrdbf9LE74xR2cqrsuiDpYVBYq8ynz+3SoQTNWd4+q5eAqm5Exh4FQpDQPfnpri6Jaz5VI40V1hLljC3b1PMM.CVbMPMEIU9AC8YhwLZ.6wPaF0AHxMmJSLvoaPmSWamIDWvUvSjF5aEAoDXkttj+sUEEMScVlRkjyopYp11TTcWNFHRFzipV2+BLjm2XHP7Oc2D242MoXyNRFwcACkhiDLyaGREyqEHZLaO7se8n8wFrsEzXYfcCoJCyBAm8oW.C.j0Pxycep9bibHzV9l9Cv2MoZWcR6Ja4GwflRuvMi0Fc0MyH7mm0dT9.Cea6KYgl3bsQsior9wlhRPOhPUqPn9j9YMT0mWV092epCUi4kUO8gZq4kU+0nm5P0bdY0CLTe9.SvnZxPfvyL87a1obGq.dMbpglrCFIzLynhSA+jMT2CEhuzsic9mYiwklAFgWVeNv33QgW08.XNbhIGfq3d3u87L2KJiYt+wXihA2GbOIYPWnY.gBQWX4wAYNKYIrxVWwt1VA5REgoK9W3Yrxp10NiUVchRz.LQI+HIi70Nr8KRk.XRj9CS7bO1t1uJJkPtXcd.L6+GIjo2pOywZKpi0WTGarnNt0h5XyE0wsWTGac+NZ+oYuJwHGj8ZCBcbmCR6l43bf.C2.Sush9O7n+0vA
      

      Hise Develop branch
      MacOs 15.3.1, Xcode 16.2
      http://musikboden.se

      ustkU 1 Reply Last reply Reply Quote 3
      • ustkU
        ustk @ulrik
        last edited by

        @ulrik Amazing! Forgot the function has override! 😎

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

        ulrikU 1 Reply Last reply Reply Quote 0
        • ulrikU
          ulrik @ustk
          last edited by

          @ustk said in Arc slider:

          @ulrik Amazing! Forgot the function has override! 😎

          Yes I had also forgot it, but I found it in the documentation.
          So, what does "override" really means?

          Hise Develop branch
          MacOs 15.3.1, Xcode 16.2
          http://musikboden.se

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

            @ulrik A function override is the concept of writing the same function but for different parameters (type and or number of arguments). The compiler selects which one to use.

            Although here it might not be a function override contrary to what I said, but probably more a simple check of the array in one unique function.

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

            ulrikU U 3 Replies Last reply Reply Quote 1
            • ulrikU
              ulrik @ustk
              last edited by

              @ustk thanks!

              Hise Develop branch
              MacOs 15.3.1, Xcode 16.2
              http://musikboden.se

              U 2 Replies Last reply Reply Quote 0
              • U
                udalilprofile @ustk
                last edited by

                @ustkHello. I tried to set a gradient, but instead of an arch I got default buttons

                1 Reply Last reply Reply Quote 0
                • U
                  udalilprofile @ulrik
                  last edited by

                  @ulrikHello. An attempt to apply the gradient failed. I got the buttons. default)

                  1 Reply Last reply Reply Quote 0
                  • U
                    udalilprofile @ustk
                    last edited by

                    @ustk 11111.png

                    1 Reply Last reply Reply Quote 0
                    • U
                      udalilprofile @ulrik
                      last edited by

                      @ulrik 11111.png

                      ulrikU 2 Replies Last reply Reply Quote 0
                      • ulrikU
                        ulrik @udalilprofile
                        last edited by ulrik

                        @udalilprofile if it's inside a laf, you need to get the width and height from the obj.area
                        "this" will not work

                        g.setGradientFill([Colours.blue, 0, 0, Colours.red, obj.area[2], obj.area[3]]);
                        

                        Hise Develop branch
                        MacOs 15.3.1, Xcode 16.2
                        http://musikboden.se

                        1 Reply Last reply Reply Quote 0
                        • ulrikU
                          ulrik @udalilprofile
                          last edited by

                          @udalilprofile when working with look and feel functions, it's very informative to

                          Console.print(trace(obj));
                          

                          you will get all the information that is used inside.

                          Same inside a keyPressCallback, use Console.print(trace(obj));
                          or inside a mouseCallback, Console.print(trace(event));

                          Hise Develop branch
                          MacOs 15.3.1, Xcode 16.2
                          http://musikboden.se

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

                          16

                          Online

                          1.7k

                          Users

                          11.8k

                          Topics

                          102.7k

                          Posts