Results 1 to 5 of 5

Thread: writing text with directx

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    New Jersey
    Posts
    334

    writing text with directx

    I am trying to draw text to a secondary surface used for blitting, using the surface.DrawText function. I have set up my font properly, that all works... However, regardless of what I set my x and y values to, the text gets drawn at 0,0.

    Anyone know what's wrong?

    Code:
    Dim FontInfo As New StdFont
    
    backbuffer.SetFontTransparency True
    backbuffer.SetForeColor vbBlue
    FontInfo.Bold = True
    FontInfo.size = 12
    FontInfo.name = "Verdana"
    backbuffer.SetFont FontInfo
    
    backbuffer.DrawText X, Y, "Test", True

  2. #2
    Addicted Member
    Join Date
    Jan 2001
    Location
    Little Rock, Ar
    Posts
    151
    Try This....

    VB Code:
    1. backbuffer.DrawText X, Y, "Test", False

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    New Jersey
    Posts
    334
    Oh yea, that works! What exactly is that parameter? It is called "b", so I just assumed it means bold or something like that...

  4. #4
    Addicted Member
    Join Date
    Jan 2001
    Location
    Little Rock, Ar
    Posts
    151

    Talking

    I don't know exactly what it is used for. It's rather anoying

  5. #5
    Fanatic Member MoMad's Avatar
    Join Date
    Oct 2000
    Location
    Seattle, WA
    Posts
    625
    Its actually a place holder for future implemenations (i think), so if you put anything other than 0 (or false) in there, you will only get the error E_NOTIMPL (Not Implemented) or something like that.. dont kno why, but since directx is something thats ever changing and ever evolving, i dont kno why they keep making such crazy changes every time they come out with a new one either!
    :MoMad:
    Nice Sig!

    http://go.to/momad/ Status: Not Ready

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width