Jump to content

Why does bounding box dimensions of a dx text differs from a dx rectangle ?


SparkzZ

Recommended Posts

Posted

I have got this problem that whenever I create a dxRectangle and on top of it a dxText with the same sizes,

Always the text has different width and height, I don't know why.

the thing is I want to convert the rectangle width and height so it become the same as the text's width and height, is there a calculation for that ?

http://imgur.com/a/ThWmn

Posted (edited)

... Wrong

In dxDrawRectangle you have x, y, width, height.

In dxDrawText you have x, y, final X and final Y.

final X = x + rectangleWidth

final Y = y + rectangleHeight

 

For example, in your code:

dxDrawRectangle > x=530 ; width=214

dxDrawText > x=530 ; finalX=744

 

You can see it, right? :-P I know it may be confusing at first.

_____

Sorry for the double-post but I can't edit my old message...

Edited by EstrategiaGTA

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