HISE Logo Forum
    • Categories
    • Register
    • Login

    Graphics image scaling

    Scheduled Pinned Locked Moved Scripting
    graphicsscalingcomponentimage
    6 Posts 3 Posters 470 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
      last edited by

      Is there a way to scale an image in a paint routine? Ideally I'd like to be able to set a ratio that is automatically adjusted, as we can for component filmstrips.

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

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

        @d-healey Necrobump

        Christoph HartC 1 Reply Last reply Reply Quote 0
        • Christoph HartC
          Christoph Hart @aaronventure
          last edited by

          Doesn‘t it already scale to the dimensions you pass in the drawImage function?

          A 1 Reply Last reply Reply Quote 0
          • A
            aaronventure @Christoph Hart
            last edited by aaronventure

            @Christoph-Hart No, it maintains the ratio. It also asks for xOffset and yOffset, because the idea for the method is to also be able to manually implement one or multiple strips and scroll through them using the offsets.

            What David is after (and me too) is an option to input a float scaleX and scaleY that would scale the image inside the given area.

            Ideally it also takes alignment (like the drawAlignedText), else animating becomes a nightmare.

            Of course, for backwards compatibility, this would be a new method, g.drawImageScaled or something

            Christoph HartC 1 Reply Last reply Reply Quote 0
            • Christoph HartC
              Christoph Hart @aaronventure
              last edited by

              @aaronventure but why on earth would you want to draw an image with a odd scale ratio between width and height. I know that's technically possible, but I always thought of it as the demonstration of the previous state of a "how can I draw an image correctly"?

              A 1 Reply Last reply Reply Quote 0
              • A
                aaronventure @Christoph Hart
                last edited by

                @Christoph-Hart Recreating animations using smaller elements... "Funny" animations, etc.

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

                44

                Online

                1.7k

                Users

                11.7k

                Topics

                101.8k

                Posts