Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


#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