using SVG files…

Home Forums General General MIDI discussion using SVG files…

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #118186
    proton
    Participant
      • Topics: 19
      • Replies: 94
      • Total: 113
      • ★★

      Hello hive,

      are there any panels available that uses drawable SVG files for the graphics that I could download and study the code?
      I checked already Roman’s RENDER demo panel but he is using the ZipFile route there. What I need is a simple procedure to use SVG file/s from my resources, nothing fancy.
      Since I am not sure if all the classes are already included by Roman I think it might be wise to ask the forum first.
      Any tips for using SVG files instead of PNGs will be much appreciated.
      Thanks in advance!
      M.

      #118189
      dnaldoog
      Participant
        • Topics: 4
        • Replies: 480
        • Total: 484
        • ★★

        I’m not sure you can, because it seems to be commented out in the Graphics Class:

        https://github.com/RomanKubiak/ctrlr/search?q=SVG&unscoped_q=SVG

        #118196
        proton
        Participant
          • Topics: 19
          • Replies: 94
          • Total: 113
          • ★★

          Hi dnaldoog!

          Thanks for the reply!!! This is exactly what I was worried about. Too bad those are not included, it would be so much easier to create panels smaller in size without the need to use PNGs but SVGs instead.
          The good news is it still can be done using the ZipFile but I personally wish for a simpler way so maybe in some future build Roman will do something about it.
          BTW: Any word on what is the current state of the Cntrlr updates? Ver.6 was around the corner but since over a year nothing happened really. I know Roman has a lot on his plate right now so I am not even gonna bother him about my little SVGs issues 😉
          Cheers people and stay safe in this turbulent times!
          M.

          #118613
          OffSignal
          Participant
            • Topics: 0
            • Replies: 3
            • Total: 3

            I agree that SVG should be an absolute minimum today for working with scalable content. It seems that JUCE supports svg files so i don’t understand why Ctrlr doesn’t.


            @proton
            : what is the “ZipFile” method you’re talking about?
            And you should look into the Downloads section, because Ctrlr-6.0.26 is available for Windows since october 2019.

            #119517
            Tedjuh
            Participant
              • Topics: 9
              • Replies: 97
              • Total: 106
              • ★★

              The Zipfile method is used in the Render demo panel. You can find it in the Ctrlr folder under panels/ demo/ Render. If you open it, select SVG in the test type combobox. The SVG’s you see then are in the icon.zip, imported in the resources tab. See the createSVGdrawable script for the rest.

              #119518
              OffSignal
              Participant
                • Topics: 0
                • Replies: 3
                • Total: 3

                Thank you for your answer Tedjuh, i will investigate this!

                EDIT:
                I’ve just open (again) the Render demo file, and now i remember why i had not found anything about svg. This demo does not work (SVG doesn’t produce any output) with the Ctrlr version i’m using (latest from dev, 6.0.26).
                I guess i need to try and launch it from the old “stable” Ctrlr version…

                • This reply was modified 3 years, 6 months ago by OffSignal.
                #119536
                goodweather
                Participant
                  • Topics: 45
                  • Replies: 550
                  • Total: 595
                  • ★★★

                  No experience with SVG and Ctrlr from my side…

                  #119924
                  dnaldoog
                  Participant
                    • Topics: 4
                    • Replies: 480
                    • Total: 484
                    • ★★

                    Hey Proton and others,

                    I finally got around to trying to use SVG in a panel (using the zipFile class as mentioned).

                    Here is an example panel, which is probably at the very limit of my knowledge about this topic!!

                    zipFile and SVG in a panel experiment

                    Version 0.1

                    Attachments:
                    You must be logged in to view attached files.
                    #119939
                    proton
                    Participant
                      • Topics: 19
                      • Replies: 94
                      • Total: 113
                      • ★★

                      Yes, same here. Only the zipFile method is what I am using for now but wish for an easy SVG implementation like we alrady have with the PNGs. But at least there is a way at all 😉
                      Cheers!

                    Viewing 9 posts - 1 through 9 (of 9 total)
                    • The forum ‘General MIDI discussion’ is closed to new topics and replies.
                    There is currently 0 users and 35 guests online
                    No users are currently active
                    Forum Statistics
                    Threads: 2,495, Posts: 17,374, Members: 77,605
                    Most users ever online was 12 on January 22, 2019 3:47 pm
                    Ctrlr