HISE Logo Forum
    • Categories
    • Register
    • Login

    How to rotate only part of an svg?

    Scheduled Pinned Locked Moved Solved Scripting
    9 Posts 4 Posters 512 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.
    • arcyA
      arcy
      last edited by

      Hi! I have an SVG like this:

      knob.png

      I would like to rotate only the lighter part and leave the red border and the dots at the original position. But if I convert the SVG to base64 svg I obtain only a string...and creating the SVG with draw function I can only rotate, obviously, the entire knob and not only part of it.
      Any suggestions?
      Thanks!

      d.healeyD A arcyA FatMitchellF 4 Replies Last reply Reply Quote 0
      • d.healeyD
        d.healey @arcy
        last edited by

        @arcy In this case I would draw it using laf rather than trying to import the svg

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

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

          @arcy you can't. You need to separate it and import the static part and the movable part as separate svgs.

          But this looks simple enough that you can draw it using the Graphics class inside laf or a paint routine, not to mention the ability to choose the exact dimensions and colors you want or change them at a whim.

          I'm sure David has a tutorial on his YouTube channel.

          1 Reply Last reply Reply Quote 1
          • arcyA
            arcy @arcy
            last edited by

            @arcy ok...do you suggest laf instead custom panel? the only thing about laf is that it's annoying to comment and uncomment line code to avoid changes on the overall hise GUI...

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

              @arcy said in How to rotate only part of an svg?:

              uncomment line code to avoid changes on the overall hise GUI...

              Use local LAF instead of global

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

              arcyA 1 Reply Last reply Reply Quote 1
              • FatMitchellF
                FatMitchell @arcy
                last edited by

                @arcy two SVGs. one with Dots and one with the knob?

                1 Reply Last reply Reply Quote 2
                • arcyA
                  arcy @d.healey
                  last edited by

                  @d-healey any advantages to use laf instead svgs?

                  d.healeyD A 2 Replies Last reply Reply Quote 0
                  • d.healeyD
                    d.healey @arcy
                    last edited by d.healey

                    @arcy said in How to rotate only part of an svg?:

                    any advantages to use laf instead svgs?

                    To use an SVG in this way you will also need to use laf - but there is no advantage to using the SVG for this particular example.

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

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

                      @arcy well yeah, you can draw things and change them on the spot, as well as change them dynamically (based on knob value, counter for animations etc.)

                      You could argue that the advantage to use SVG over local look and feel or paint routines is that it's easier to get shapes down but I would disagree, I find it easier to get things down progfamatocally with numbers and formulas than manually dragging elements around in figma or photoshop, especially if you define everything with constants, as that makes any changes super easy to make.

                      1 Reply Last reply Reply Quote 1
                      • arcyA arcy has marked this topic as solved on
                      • First post
                        Last post

                      27

                      Online

                      1.7k

                      Users

                      11.7k

                      Topics

                      102.0k

                      Posts