Text Error in 900 build

rifter1818

Well-known member
Joined
Sep 11, 2003
Messages
255
Location
A cold dark place
I have no idea whats causing this but the allignment is really off
works perfectly for top left but centered oh boy... draws it well outside the rectangle it was intended for... Any one else experianced this, and i tried going to the 1901 build but so much more went wrong there im going back to 900....
 
2d Text

Usunge the font.drawtext ... with the allignment of 1 or 4,.. it draws the text way outside the intended rectangle but it draws it right if the allignment is 0,
 
Completely forgot about this thread, sorry :)

Can you show some you are using to draw the text? Like how big you are making the rectangle, font etc. As far as I can tell drawing 2D text works fine for me.
 
I found the solution

I just have to convert the rectangles then allignment will work.
Rect = new rectangle(rect.x,rect.y,Rect.Right,Right.bottom)
instead of Rect= new rectangle(X,Y,Width,Height)
The only reason for this error that i can think of is that Microsoft developers used the WRONG VARIABLES and didnt notice... Note that the expanded Rectangle now alligns the text to the dimensions of the old rectangle.
 
They were probably mapping C++ RECT structure to .NET Rectangle by copying memory. And heres the problem. RECT is defined by x1,y1,x2,y2 while Rectangle is defined by x1,y1,width,height. By the way, this will be solved in the Summer Update 2004.
 
Last edited by a moderator:
Kavan said:
They were probably mapping C++ RECT structure to .NET Rectangle by copying memory. And heres the problem. RECT is defined by x1,y1,x2,y2 while Rectangle is defined by x1,y1,width,height. By the way, this will be solved in the Summer Update 2004.
That sounds quite believable, im not multilingual enough to know that the C++ RECT would be any different (i only know VB right now but im going to learn others over time) You live and learn i guess.
 
Back
Top