HISE Logo Forum
    • Categories
    • Register
    • Login

    Graphics.fillPath()

    Scheduled Pinned Locked Moved General Questions
    10 Posts 3 Posters 219 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.
    • LindonL
      Lindon
      last edited by Lindon

      Cant seem to get this to work at all, I've defined my path in my paths object like this (pretty std way);

      const var triangleDown = "46.t0F..d.QLP3MCIFKBwAQN96gCoI5vPzevO6P..XQD0eOfODa..3AD0eOfOzXkA";
      icons.triangleDown = Content.createPath();
      icons.triangleDown.loadFromData(triangleDown);
      
      

      and I just say this:

      g.fillPath(Paths.icons.triangleDown, [100,100,100,100]);
      

      but it doesnt draw anything...what am I doing wrong?

      I should say this is in a panel paint routine not a LAF callback.

      HISE Development for hire.
      www.channelrobot.com

      Dan KorneffD 1 Reply Last reply Reply Quote 0
      • Dan KorneffD
        Dan Korneff @Lindon
        last edited by

        @Lindon said in Graphics.fillPath():

        [100,100,100,100]

        wouldn't this draw the pixel in the last pixel of the bottom right of your panel?
        I think you need [0,0,100,100]

        Dan Korneff - Producer / Mixer / Audio Nerd

        LindonL 1 Reply Last reply Reply Quote 0
        • LindonL
          Lindon @Dan Korneff
          last edited by Lindon

          @Dan-Korneff said in Graphics.fillPath():

          @Lindon said in Graphics.fillPath():

          [100,100,100,100]

          wouldn't this draw the pixel in the last pixel of the bottom right of your panel?
          I think you need [0,0,100,100]

          Well my panel is 1000 x 600, so it should draw the graphics 100 pixels in and down and be 100 pixels square...[x,y,w,h]

          HISE Development for hire.
          www.channelrobot.com

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

            @Lindon
            Changing some code here will make it work

            const triangleDown = "46.t0F..d.QLP3MCIFKBwAQN96gCoI5vPzevO6P..XQD0eOfODa..3AD0eOfOzXkA";
            const path = Content.createPath();
            path.loadFromData(triangleDown);
            
            g.fillPath(path, [100,100,100,100]);
            

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

            LindonL 1 Reply Last reply Reply Quote 0
            • LindonL
              Lindon @ulrik
              last edited by

              @ulrik yeah I'm already doing that in my paths.js

              icons.triangleDown = Content.createPath();
              icons.triangleDown.loadFromData(triangleDown);
              

              HISE Development for hire.
              www.channelrobot.com

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

                @Lindon then there must be some issue with your paths?

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

                1 Reply Last reply Reply Quote 0
                • LindonL
                  Lindon @Lindon
                  last edited by

                  @ulrik -- yet weirdly your works and mine doesnt... odd....thanks I can take it from here I think...

                  HISE Development for hire.
                  www.channelrobot.com

                  ulrikU Dan KorneffD 2 Replies Last reply Reply Quote 0
                  • ulrikU
                    ulrik @Lindon
                    last edited by

                    @Lindon
                    this works

                    const Paths = {"icons":{}};
                    const var triangleDown = "46.t0F..d.QLP3MCIFKBwAQN96gCoI5vPzevO6P..XQD0eOfODa..3AD0eOfOzXkA";
                    Paths.icons.triangleDown = Content.createPath();
                    Paths.icons.triangleDown.loadFromData(triangleDown);
                    
                    
                    g.fillPath(Paths.icons.triangleDown, [100,100,100,100]);
                    

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

                    1 Reply Last reply Reply Quote 0
                    • Dan KorneffD
                      Dan Korneff @Lindon
                      last edited by

                      @Lindon namespace issue?

                      Dan Korneff - Producer / Mixer / Audio Nerd

                      LindonL 1 Reply Last reply Reply Quote 0
                      • LindonL
                        Lindon @Dan Korneff
                        last edited by

                        @Dan-Korneff said in Graphics.fillPath():

                        @Lindon namespace issue?

                        possibly - tho I checked the namespace stuff, but I recompiled everything and its working OK now... very likely user error.

                        HISE Development for hire.
                        www.channelrobot.com

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

                        57

                        Online

                        1.7k

                        Users

                        11.7k

                        Topics

                        101.8k

                        Posts