drawImageAt()

Home Forums General Programming drawImageAt()

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #29479
    zeoka
    Participant
      • Topics: 73
      • Replies: 466
      • Total: 539
      • ★★★

      Hi
      I do custom comp that is a dynamic background(on other layer) for a tab with possibilities of color change instead to have 8×16 background tab images.
      I need to put combos background that I can’t actually reproduce because there is too
      much effects that I don’t handle currently
      It seems that I need to define the path before
      AFAIK there’s a topic about getResourceAsImage() I don’t find
      Anyway I don’t get the syntax correctly…
      Can I get images in Ctrlr resources ?

      #29534
      zeoka
      Participant
        • Topics: 73
        • Replies: 466
        • Total: 539
        • ★★★

        Not found image scripts .. I’ve build my combos background with a homemade shadow effect :

        function combo1()
                 g:setColour(Colour(0xFF181818))
                 g:fillRoundedRectangle(17,105,126,38,6)
                 g:setColour(Colour(0xFF1D1D1D))
                 g:fillRoundedRectangle(17,109,126,34,6)
                 g:setColour(Colour(0xFF1E1E1E))
                 g:fillRoundedRectangle(17,110,126,33,6)
                 g:setColour(Colour(0xFF1F1F1F))
                 g:fillRoundedRectangle(17,111,126,32,6)
                 g:setColour(Colour(0xFF202020))
                 g:fillRoundedRectangle(17,112,126,31,6)
                 g:setColour(Colour(0xFF222222))
                 g:fillRoundedRectangle(17,113,126,30,6) 
                 g:setColour(Colour(0xFF000000))
                 g:drawRoundedRectangle (17,105,126,38,6,1.5)
             end

        a way to create shadow effect.I’ve even render it more hard to imitate what I’ve done in skinman

        #29991
        zeoka
        Participant
          • Topics: 73
          • Replies: 466
          • Total: 539
          • ★★★

          Hi
          I still need to draw image
          I ‘ve tried this but I think ist’s more complicated

          
          knbimg = panel:getResourceAsImage("My Image")
          g:drawImageAt(imageToDraw(knbimg),20,20,false)
          

          Anyone knows ?

          #29994
          atom
          Keymaster
            • Topics: 159
            • Replies: 2945
            • Total: 3104
            • ★★★★★

            Have a look at the DEMO – Rendering panel in the examples, the init() method loads the images and the drawImages() method draws them when needed. It should be enough to get you started.

            #30027
            zeoka
            Participant
              • Topics: 73
              • Replies: 466
              • Total: 539
              • ★★★

              Thank you Atom
              There is a lot things here
              I get it and resized, next step look and feel 🙂
              A good thing because I can’t repaint other mods (imageslider):
              I do :

              mr = panel:getImageSliderComponent("MYMOD")
              mr:repaint()
              end

              when I changed uiImageSliderResource but nothing happens
              If the component is in a group or tab do I must repaint the parent ?
              I tried it also

              #30031
              zeoka
              Participant
                • Topics: 73
                • Replies: 466
                • Total: 539
                • ★★★

                Just tried to copy the customLook&Feel on my panel
                and add setLookAndFeel (panel:getCanvas(), CustomLookAndFeel())
                to my colorchange script
                All uislider are not changed (not in tabs)
                But the unpredictable thing is now that repaint the uiImageSliders
                and that crash a lot
                also tried panel:getCanvas():repaint()

                #30068
                atom
                Keymaster
                  • Topics: 159
                  • Replies: 2945
                  • Total: 3104
                  • ★★★★★

                  Please do not use the LookAndFeel stuff in Lua yet, it is not ready and it will cause bad things to happen. Like i wrote i’ll let you know when it’s ready.

                Viewing 7 posts - 1 through 7 (of 7 total)
                • The forum ‘Programming’ is closed to new topics and replies.
                There is currently 0 users and 74 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