Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Resetting initial image size

    Help
    3
    5
    172
    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.
    • Retrocade_media
      Retrocade_media F last edited by Retrocade_media

      I use border = createimage() for the border in my Tate template, and I was wondering if its possible to resize the initial width and height value? Not scale, but resize.
      The idea I had was to do:

      if docked != lastdocked then
      Border = 0
      Border = createimage(special math stuff for width and height)
      Endif
      

      I feel like that wouldn't work though. Any ideas?

      1 Reply Last reply Reply Quote 0
      • Martin
        Martin Fuze Team last edited by

        Given docked vs undocked only ever involves two resolutions, wouldn't it be just as easy to create two images up front and just use whichever you need depending on docked state?

        1 Reply Last reply Reply Quote 2
        • PB____
          PB____ last edited by

          I don't think you can create images that are larger than the screen resolution?

          Wouldn't freeImage work for this?

          int lastDocked = docked()
          var border = createImage(gWidth(), gHeight(), false, image_rgba)
          loop
              clear()
          // things
              if docked() != lastdocked then
                  freeImage(border)
                  border = createImage(gWidth(), gHeight(), false, image_rgba)
              endif
          // other stuff
              update()
          repeat
          
          1 Reply Last reply Reply Quote 1
          • Martin
            Martin Fuze Team last edited by

            I don't see why that wouldn't work.

            I'd need to run my tests again when I'm not working - there was a bug related to image creation that I reported when we were first looking into the idea of screen rotation but I reported that and it was fixed in a previous update. I don't remember what the screen size limits are but I was told. I won't repeat until I've tested what you can and can't do.

            1 Reply Last reply Reply Quote 1
            • Retrocade_media
              Retrocade_media F last edited by

              @PB____ I think that'll work, I thought that was a function but I couldn't remember it. Also yea, but I'm looking to create images that are smaller than the screen and then scaled up.
              @Martin Sure you could create two images, however I'm making this as part of the template to fix an issue with it, and I'd like to let people only have to draw one image

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