Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to use DrawString to position text

How to use DrawString to position text

Scheduled Pinned Locked Moved C#
graphicshelptutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    shultas
    wrote on last edited by
    #1

    Hello- I am currently using the Graphics.DrawString method to write text on the screen. I am using the StringFormatFlags.DirectionVertical in order to display a "banner" of text on the right hand side of the screen. The problem I am faced with is the text is in the opposite direction of what I am looking for. I am not really sure how to word this... The way the string shows up now with the DirectionVertical flag is if you turned your head 90 degrees to the right, the text would be legible. If you turned your head 90 degrees to the left, the text would be upside down. I am trying to use the DrawString method to make it so the text is in the opposite direction. If you turn your head 90 degrees to the LEFT, the text would be legible, 90 degrees to the RIGHT it would appear upside down. I basically want to "flip" the text 180 degrees. My english is weak hopefully I explained properly. Thank you so much in advance

    P L 2 Replies Last reply
    0
    • S shultas

      Hello- I am currently using the Graphics.DrawString method to write text on the screen. I am using the StringFormatFlags.DirectionVertical in order to display a "banner" of text on the right hand side of the screen. The problem I am faced with is the text is in the opposite direction of what I am looking for. I am not really sure how to word this... The way the string shows up now with the DirectionVertical flag is if you turned your head 90 degrees to the right, the text would be legible. If you turned your head 90 degrees to the left, the text would be upside down. I am trying to use the DrawString method to make it so the text is in the opposite direction. If you turn your head 90 degrees to the LEFT, the text would be legible, 90 degrees to the RIGHT it would appear upside down. I basically want to "flip" the text 180 degrees. My english is weak hopefully I explained properly. Thank you so much in advance

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      I suspect you can achieve this by using a RotateTransform.

      Deja View - the feeling that you've seen this post before.

      My blog | My articles

      1 Reply Last reply
      0
      • S shultas

        Hello- I am currently using the Graphics.DrawString method to write text on the screen. I am using the StringFormatFlags.DirectionVertical in order to display a "banner" of text on the right hand side of the screen. The problem I am faced with is the text is in the opposite direction of what I am looking for. I am not really sure how to word this... The way the string shows up now with the DirectionVertical flag is if you turned your head 90 degrees to the right, the text would be legible. If you turned your head 90 degrees to the left, the text would be upside down. I am trying to use the DrawString method to make it so the text is in the opposite direction. If you turn your head 90 degrees to the LEFT, the text would be legible, 90 degrees to the RIGHT it would appear upside down. I basically want to "flip" the text 180 degrees. My english is weak hopefully I explained properly. Thank you so much in advance

        L Offline
        L Offline
        luisnike19
        wrote on last edited by
        #3

        try to use this... save your drawing like an image and the apply the flip image.RotateFlip(RotateFlipType.Rotate180FlipX); change the RotateFlipType in order to solve exactly your problem.. :cool:

        luisnike19

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups