Navigation

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

    drawImage/drawImageEx coordinates mismatch

    Bug Reporting (FUZE 4 Nintendo Switch)
    2
    2
    116
    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.
    • N
      Nisse5 F last edited by

      It seems like drawImage() and drawImageEx() use difference reference points when drawing the image. drawImage() uses top left of the image, while drawImageEx() uses the center of the image as the reference point.

      I can't find any reference in the documentation that this should be different.

      img = loadImage("FUZE/brick01")
      toggle = true
      fpscounter = 0
      
      x = 100
      y = 200
      
      loop
         clear()
         fpscounter += 1
         if fps counter % 60 == 0 then toggle = !toggle endif
         if toggle then
           print("drawImage")
           drawImage(img, x, y)
         else
           print("drawImageEx")
           drawImageEx(img, {x,y}, 0, {1,1}, white, {0,0})
         endif
         update()
      repeat
      
      1 Reply Last reply Reply Quote 0
      • M
        MikeDX last edited by

        This is a documentation issue, and the reason for this being this way is because of the angle parameter, where you would normally want the image to rotate about the centre of the image.

        There is an issue for this internally and it'll be updated in the help in the near future!

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