HISE Logo Forum
    • Categories
    • Register
    • Login

    Rectangle function map missing trimmed

    Scheduled Pinned Locked Moved General Questions
    18 Posts 2 Posters 454 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.healeyD
      d.healey @aaronventure
      last edited by

      @aaronventure Oh good idea, I'm not actually subscribed to it for notifications, I will do that too

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

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

        @Christoph-Hart It seems that withBottom, withBottomY, and withHeight all do the same thing?

        46bcde06-e4a3-47b6-b1c8-d857fa29b747-image.png

        HiseSnippet 931.3ocyV8taSiDDecZLhjCPfDO.V4Stmphhs6eRE5zQSZ6QzQKQjdniOg1rdc7pZuaz50zFg3ciGo6M3tY8lD6dMDJAPB+gHOyryL+xuc7LyPofPyxDRjUyKlMkhrdf8nYbUb+XLiiFbLx5Q1mgyTToiQUuYSwYYzPjk0V+gVgUi5nhm+426gSvbBsTEB8FAiPeIKkoJ0N74+IKI4TbH8BVZkSu6yGPD79hDQNfmsr6flhIWhmPOGqOVMazKvYwHqe01OZLwO5fftdG5c3A6dnm2dcGuaGeR3dGFDrePXjeW79cAmt2IgLkPNRgUzLHn8DgyFEKthaRvaXYrwITsfGZDjYiZT+XVR3vEjSFBYUeXIUskgpdp8YrP1R8kT1iKL3T5QURyp15fj2WAjrp.o5FH8D6QDIappzhFO+h8.NbCFgg6lpPwbVTs10s6KfSvUsSwWROUBBK8vc+Nc1wA9Y6m0rIb+jobdOV5LDyoIdN+lyBOmPU8EoSEbPvskwbKsOlWamQUCABR8ZQthwotQ4bhhI3tS1t4GZ1PGSLDNULKSGqWJH3jdhbdXlqN0MlzNBpZNJIw0Tg.mRRmosnskoytV8RqiSfhGiigR7UGkvlvogWPuFP2ULUbOgRIRasiCdGmVD.zRZXqOe3.qkn30ThxE2tLLt96sMX9iqfi7WOG4WxQ9+jxQu86DI810vRAqmkBJYofe5XoWPYShUeyjjILkbzh+VNB94BE8Ub2h+dM+XSm+uonnUZSSnRQRBUtRy5tux04nKOOcLUtCbMkjSWdPnayMagcu6VKLh49sxAE7Abl5USoykOUjDpaMoe+1M7PyKPf29qAGiUXcOv45fyMkJULMbrNl9dXpioiXC6ioYWpDSgntrpBfrpv5CWzuTWYgXPpuusoeE55pCllUU3JVnBFCYacMHFWbqok3nBHdmSge0TD9CIEAURwmj28Tb6AKvHMQXdBVcy4b5M.la.pbtwvE8.DdFSMq5FBeEC+5r1ge2UH9D6gLEId0Xr1JvHTS8i.iyWY3g1mDEAexWBv51m92a59Aegza5ON4LrRxf5.6yySGAcfHTH6bn5HSeeWSWQYj6nk0LvHJOrP3egm4F8zxVyM5svHJESjh2QL8KzKkb+BM.l3EKs0.1dDjc7PE8PpxyovNRuiPtYntki9apiAapi6toNt2l539apiGroN18K6ndE1ixgw1lOaPnyFdRQSWKqS3XnBrnZE8e.q7RdKB
        

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

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

          @Christoph-Hart We seem to be missing toArray, I tried to add this myself but kept getting some weird errors that I don't understand.

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

          d.healeyD 1 Reply Last reply Reply Quote 1
          • A
            aaronventure
            last edited by aaronventure

            Referring to any property will return the last one referred, so if you refer to rect.x and then to rect.wtf, the second one will return rect.x

            daccea06-2a0d-4481-8d6e-4d7349d3c4ad-image.png

            Also, not having .centre or getCentre() or .scaledCentred(scalingX, scalingY) is also a bummer, seems like really low hanging fruit.

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

              @aaronventure said in Rectangle function map missing trimmed:

              Referring to any property will return the last one referred, so if you refer to rect.x and then to rect.wtf, the second one will return rect.x

              Not sure what you mean here, got a snippet?

              fa3e2d19-d7db-4018-b02d-7c6c0da7068a-image.png

              @aaronventure said in Rectangle function map missing trimmed:

              Also, not having .centre or getCentre() or .scaledCentred(scalingX, scalingY) is also a bummer, seems like really low hanging fruit.

              We have .withCentre and .reduced

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

              A 1 Reply Last reply Reply Quote 0
              • A
                aaronventure @d.healey
                last edited by

                @d-healey said in Rectangle function map missing trimmed:

                Not sure what you mean here, got a snippet?

                Call .x in a print command, then change the property to .whatever and hit F5 again.

                @d-healey said in Rectangle function map missing trimmed:

                We have .withCentre and .reduced

                Alright I actually managed to add scaledCentre to the source, it works but it's not showing up in the API or autocomplete. How do I do that before making a PR?

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

                  @aaronventure said in Rectangle function map missing trimmed:

                  Call .x in a print command, then change the property to .whatever and hit F5 again.

                  I see, so you if you use a non-existent key it returns the value from the last valid key you used.

                  @aaronventure said in Rectangle function map missing trimmed:

                  Alright I actually managed to add scaledCentre to the source,

                  What is the difference between this and reduced()?

                  Functions we add don't show up in the API because Christoph has to run some magic batch script for that.

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

                  A 1 Reply Last reply Reply Quote 0
                  • A
                    aaronventure @d.healey
                    last edited by

                    @d-healey said in Rectangle function map missing trimmed:

                    What is the difference between this and reduced()?

                    Reduced trims half what you put in from each side, scaledCentre allows you to put in a scaling factor while keeping the rectangle centred. You could technically do it with reduced by writing a custom function of course, i mean you can do with scaled by adding a translation, but you can say that for half of the methods in the class.

                    @d-healey said in Rectangle function map missing trimmed:

                    Functions we add don't show up in the API because Christoph has to run some magic batch script for that.

                    Interesting. Alright, then!

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

                      @aaronventure said in Rectangle function map missing trimmed:

                      scaledCentre allows you to put in a scaling factor while keeping the rectangle centred.

                      Isn't that the same as .scaled()?

                      Oh I see, scaled only works from the top left corner.

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

                      A 1 Reply Last reply Reply Quote 0
                      • A
                        aaronventure @d.healey
                        last edited by

                        @d-healey yeah, there's withSizeKeepingCentre but that still requires fetching width and height first

                        Anyway, PR's up

                        Link Preview Image
                        - add centre-related methods to the Rectangle class by aaronventure · Pull Request #717 · christophhart/HISE

                        Added getCentre(), getCentreX() and getCentreY() from the base Rectangle class Added scaledCentre() which will perform factor scaling while keeping the same centre Removed that unused p because why...

                        favicon

                        GitHub (github.com)

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

                          @d-healey said in Rectangle function map missing trimmed:

                          We seem to be missing toArray, I tried to add this myself but kept getting some weird errors that I don't understand.

                          Solved

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

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

                            Looks like .setCentre doesn't work, and why are there two setSize functions?

                            ac4a8759-704d-430a-b6c1-643bb5262cea-image.png

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

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

                              When using g.addNoise() the area parameter is still expecting an array.

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

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

                              12

                              Online

                              1.7k

                              Users

                              11.8k

                              Topics

                              102.7k

                              Posts