Rotating text
Rotating text
Rotating text
Rotating text
Rotating text
Rotating text Rotating text Rotating text Rotating text Rotating text Rotating text Rotating text Rotating text
Rotating text Rotating text
Rotating text
Go Back  Xtreme Visual Basic Talk > > > Rotating text


Reply
 
Thread Tools Display Modes
  #1  
Old 02-18-2011, 03:53 PM
ClarkVent ClarkVent is offline
Newcomer
 
Join Date: Jun 2003
Posts: 2
Default Rotating text


First of all, I'm new to DirectX and I'm also pretty new to VB.Net. I'm not new to programming however.

I'm just experimenting a bit with both and I'm trying to create a simple rotating text. What I do now is create a sprite, draw some text on it and rotate the sprite:

Code:
  ' Create the D3DFont
  Dim SystemFont As System.Drawing.Font = New System.Drawing.Font("Arial", 10.0F, FontStyle.Regular)
  D3DFont = New Direct3D.Font(RenderDevice, SystemFont)

  ' Create the Sprite
  Sprite = New Direct3D.Sprite(RenderDevice)

  ' Draw text on sprite
  Sprite.Begin(SpriteFlags.AlphaBlend)
  D3DFont.DrawText(Sprite, "This is a text", 0, 0, Color.White)
  Sprite.End()

  ' Rotate the sprite
  Dim mat As New Matrix
  mat = Matrix.Transformation2D(Nothing, 0.0F, New Vector2(1.0, 1.0), New Vector2(10, 10), 1, New Vector2(10, 10))
  Sprite.Transform = mat
And even though this works, the text looks like crap because it's terribly aliased.

I'm looking for a way to draw rotated anti-aliased text. I read on a tutorial page somewhere you could use D3DXCreateFontIndirect to create an anti-aliased D3DFont, but I can't seem to find its VB.Net counterpart.

So what is the proper way to draw and rotate anti-aliased text (not using bitmaps)?

Thanks in advance.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Rotating text
Rotating text
Rotating text Rotating text
Rotating text
Rotating text
Rotating text Rotating text Rotating text Rotating text Rotating text Rotating text Rotating text
Rotating text
Rotating text
 
Rotating text
Rotating text
 
-->