Jump to content

Why does dxDrawText use end position and not width and hight?


Gaimo

Recommended Posts

  • 4 months later...

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 by FernandoMTA
Link to comment

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...