Gaimo Posted February 10, 2022 Share Posted February 10, 2022 I solved the problem by doing this: function dxNewDrawText(...) arg = {...} arg[4] = arg[2] + arg[4] arg[5] = arg[3] + arg[5] dxDrawText(unpack(arg)) end But I would like to understand the reason to use end position. Link to comment
FernandoMTA Posted June 13, 2022 Share Posted June 13, 2022 (edited) float leftX, float topY [, float rightX = leftX, float bottomY = topY It uses those arguments for positioning so that you can determine the 4 points of a rectangle in which the text will be. Default alignment is horizontal "left" and vertical "top". You can easily change this to "center", "center" to place your text in the middle of the rectangle you defined with the 4 left, top, right, bottom points. Idk why they didn't just do x,y, width,height but it works like this. Edited June 13, 2022 by FernandoMTA Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now