HISE Logo Forum
    • Categories
    • Register
    • Login

    Custom borderRadius? e.g. `[0, 0, 5, 5]`

    Scheduled Pinned Locked Moved Newbie League
    7 Posts 4 Posters 27 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.
    • D
      daniloprates
      last edited by

      Is it possible to do Custom borderRadius? e.g. borderRadius: [0, 0, 5, 5]

      1 Reply Last reply Reply Quote 0
      • rglidesR
        rglides
        last edited by

        you can do

        var borderRadius = 5;
        
        g.setColour(Colours.grey);
        g.fillRoundedRectangle([0, 0, 5, 5], borderRadius);
        

        inside a paintRoutine for a panel, is that what you mean? If you mean a different radius for each corner, then I don't think so, best way might be to mask a panel with another panel

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

          Here ya go

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

          1 Reply Last reply Reply Quote 2
          • ChazroxC
            Chazrox @rglides
            last edited by Chazrox

            @rglides @daniloprates you can make custom corner radius per corner!

            g.fillRoundedRectangle(a, {CornerSize: 20, Rounded:[1, 1, 0, 0]});

            
            //you could do this: 
            
            //Play with these values and see what you get.
            const var myCorners = {CornerSize: 20, Rounded:[1, 1, 0, 0]};
            
            g.fillRoundedRectangle(a, myCorners);
            
            
            

            got this from @d-healey of course 🙏

            **and ofcourse he beat me to it. lol so I'll leave this here anyways.

            rglidesR 1 Reply Last reply Reply Quote 2
            • rglidesR
              rglides @Chazrox
              last edited by

              @Chazrox wow did not know that! cool cool

              ChazroxC 1 Reply Last reply Reply Quote 0
              • ChazroxC
                Chazrox @rglides
                last edited by

                @rglides yeah this one changed the game for me making tabs n stuff like that.

                rglidesR 1 Reply Last reply Reply Quote 0
                • rglidesR
                  rglides @Chazrox
                  last edited by

                  @Chazrox fr, gonna mess around a bit now

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

                  34

                  Online

                  1.9k

                  Users

                  12.3k

                  Topics

                  107.0k

                  Posts