Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted

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,

  • *Experts*
Posted

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.

Posted

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.

Posted (edited)
They were probably mapping C++ RECT structure to .NET Rectangle by copying memory. And here's 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. Edited by Kavan
Posted
They were probably mapping C++ RECT structure to .NET Rectangle by copying memory. And here's the problem. RECT is defined by x1' date='y1,x2,y2 while Rectangle is defined by x1,y1,width,height. By the way, this will be solved in the Summer Update 2004.[/quote']

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...