Jump to content

How to get the center of an image


Karoffe

Recommended Posts

Posted

I want to draw some text on each image, all images are the same size, problem is even if I could adjust 1 text to be so close to the center of the image, other texts won't look in the center because of their width, height..

so I want a way to get the center of an image depending on the width, height of the text...

Images width, height = 200, 200

  • Moderators
Posted

You can center the text inside it's boundingbox. No need for extreme calculations.

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...