Forum
    • Categories
    • Register
    • Login

    Rectangle function map missing trimmed

    Scheduled Pinned Locked Moved General Questions
    18 Posts 2 Posters 1.3k 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.
    • 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.

      David HealeyD 1 Reply Last reply Reply Quote 0
      • David HealeyD
        David Healey @aaronventure
        last edited by David 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

        Free HISE Bootcamp Full Course for beginners.
        YouTube Channel - Public HISE tutorials
        My Patreon - HISE tutorials

        A 1 Reply Last reply Reply Quote 0
        • A
          aaronventure @David 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?

          David HealeyD 1 Reply Last reply Reply Quote 1
          • David HealeyD
            David Healey @aaronventure
            last edited by David 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.

            Free HISE Bootcamp Full Course for beginners.
            YouTube Channel - Public HISE tutorials
            My Patreon - HISE tutorials

            A 1 Reply Last reply Reply Quote 0
            • A
              aaronventure @David 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!

              David HealeyD 1 Reply Last reply Reply Quote 0
              • David HealeyD
                David Healey @aaronventure
                last edited by David 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.

                Free HISE Bootcamp Full Course for beginners.
                YouTube Channel - Public HISE tutorials
                My Patreon - HISE tutorials

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

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

                  Anyway, PR's up

                  https://github.com/christophhart/HISE/pull/717

                  1 Reply Last reply Reply Quote 1
                  • David HealeyD
                    David Healey @David 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

                    Free HISE Bootcamp Full Course for beginners.
                    YouTube Channel - Public HISE tutorials
                    My Patreon - HISE tutorials

                    1 Reply Last reply Reply Quote 1
                    • David HealeyD
                      David Healey
                      last edited by David Healey

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

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

                      Free HISE Bootcamp Full Course for beginners.
                      YouTube Channel - Public HISE tutorials
                      My Patreon - HISE tutorials

                      1 Reply Last reply Reply Quote 0
                      • David HealeyD
                        David Healey
                        last edited by

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

                        Free HISE Bootcamp Full Course for beginners.
                        YouTube Channel - Public HISE tutorials
                        My Patreon - HISE tutorials

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

                        43

                        Online

                        2.1k

                        Users

                        13.0k

                        Topics

                        113.2k

                        Posts