Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#ActualMonza

Posted 20 March 2013 - 07:32 AM

Trying to get the rendered bounding rectangle from a font sprite set to render into objectspace (not screen space) coordinates.

 

But the d3d9Font.measurestring(sprite .......    only gives the non objectspace rectangle even through the sprite is defined to render in objectspace.

 

So basically, even though the font is rendered into the 3D scene correctly at the correct depth and perspective based size (eg the same sized font may range from a few to 500 pixels of more depending on depth), I cannot get this size rectangle, because the measurestring only returns a fixed size (eg 250 x 100) regardless of rendered depth as if it was rendered directly to screen with objectspace not set (ie in transformed coordinates)

 

Do I need to use the defined sprite transformation matrix in another calculation or am I missing something?   Is there another way to compute the final text rendered screen size?

 


#1Monza

Posted 20 March 2013 - 07:31 AM

Trying to get the rendered bounding rectangle from a font sprite set to render into objectspace (not screen space) coordinates.

 

But the d3d9Font.measurestring(sprite .......    only gives the non objectspace rectangle even through the sprite is defined to render in objectspace.

 

So basically, even though the font is rendered into the 3D scene correctly at the correct depth and perspective based size (eg the same sized font may range from a few to 500 pixels of more depending on depth), I cannot get this size rectangle, because the measurestring only returns a fixed size (eg 250 x 100) regardless of rendered depth as if it was rendered directly to screen with objectspace not set (ie in transformed coordinates)

 

Do I need to use the defined sprite transformation matrix in another calculation or am I missing something?   Is there another way to compute the final text rendered screen size?

 


PARTNERS