Help Rotating Text

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jonathan Wood

    Help Rotating Text

    I'd like to print some text at an angle. I was able to get
    Graphics.Rotate Transform() to work but rotating the entire mapping area
    makes positioning the text a nightmare.

    I'd like to instead change the underlying LOGFONT escapement.

    But for reasons I don't understand, the only examples I can find of this are
    for the .NET Compact Framework (for example,
    http://msdn2.microsoft.com/en-us/library/ms404359.aspx).

    Can anyone provide a .NET newbie with an example of changing the font
    escapement? And if the solution requires Microsoft.Windo wsCE, could they
    please explain why, when I'm not currently developing for CE?

    Thanks for any advice.

    --
    Jonathan Wood
    SoftCircuits Programming


  • Peter Duniho

    #2
    Re: Help Rotating Text

    On Sun, 22 Jul 2007 18:09:07 -0700, Jonathan Wood <jwood@softcirc uits.com>
    wrote:
    I'd like to print some text at an angle. I was able to get
    Graphics.Rotate Transform() to work but rotating the entire mapping area
    makes positioning the text a nightmare.
    >
    I'd like to instead change the underlying LOGFONT escapement.
    >
    But for reasons I don't understand, the only examples I can find of this
    are for the .NET Compact Framework (for example,
    http://msdn2.microsoft.com/en-us/library/ms404359.aspx).
    See http://msdn2.microsoft.com/en-us/library/ms533931.aspx

    I wish MSDN had a way to exclude various things from searches
    automaticaly. Or even better, be smart enough to realize that unless I
    specifically ask for stuff related to Compact Framework, Japanese, Java,
    WebUI, etc. that I really just want the basic things. They ought to track
    what links most people actually wind up using from the search results, and
    weight future searches according to that.

    In the meantime, just scroll down until you find something more relevant.
    :)

    That said, the Compact/CE docs are often usable, since they usually define
    a subset of the regular functionality. If they tell you that you _can_ do
    something, usually you can do the same thing with the regular API.

    Pete

    Comment

    • Jonathan Wood

      #3
      Re: Help Rotating Text

      Peter,
      That's a Windows API reference. I already know how to do this using the API.
      It's determining the best way to do that within the context of .NET and
      Windows forms that I'm unclear on.
      I wish MSDN had a way to exclude various things from searches
      automaticaly. Or even better, be smart enough to realize that unless I
      specifically ask for stuff related to Compact Framework, Japanese, Java,
      WebUI, etc. that I really just want the basic things. They ought to track
      what links most people actually wind up using from the search results, and
      weight future searches according to that.
      Tell me about it! I searched and searched and searched. Every example I
      could find was specific to the compact framework. That why I made the
      comment that, if the answer involved the use of Microsoft.Windo wsCE, I would
      like to know why.

      Still looking for an example...

      Thanks.

      --
      Jonathan Wood
      SoftCircuits Programming


      Comment

      • Peter Duniho

        #4
        Re: Help Rotating Text

        On Mon, 23 Jul 2007 10:17:55 -0700, Jonathan Wood <jwood@softcirc uits.com>
        wrote:
        Peter,
        >>
        That's a Windows API reference. I already know how to do this using the
        API. It's determining the best way to do that within the context of .NET
        and Windows forms that I'm unclear on.
        I suspect that if you create a LOGFONT structure in your C# program that
        looks like the native Win32 LOGFONT structure, that would work. I haven't
        tried it myself, but it seems to me that until you have, dismissing the
        Win32 reference is premature. :)

        I think it's odd that there's not a built-in structure that can be used,
        but the lack of one shouldn't stop you from experimenting a little. :)

        Pete

        Comment

        • Jonathan Wood

          #5
          Re: Help Rotating Text

          It *is* a Win32 reference, regardless of what either of us think or feel. At
          any rate, with LONG, BYTE, and TCHAR types, it's obviously not a C#
          reference.

          I know how to set a LOGFONT and create a font that uses it in C or C++.

          I guess all I need to figure out is how to duplicate the structure in C# and
          that product a font based on it. Too bad I'm new to .NET or else knowledge
          about LOGFONT would probably be enough to get me up and running.

          --
          Jonathan Wood
          SoftCircuits Programming



          "Peter Duniho" <NpOeStPeAdM@nn owslpianmk.comw rote in message
          news:op.tvxhs2d 18jd0ej@petes-computer.local. ..
          On Mon, 23 Jul 2007 10:17:55 -0700, Jonathan Wood <jwood@softcirc uits.com>
          wrote:
          >
          >Peter,
          >>>>
          >That's a Windows API reference. I already know how to do this using the
          >API. It's determining the best way to do that within the context of .NET
          >and Windows forms that I'm unclear on.
          >
          I suspect that if you create a LOGFONT structure in your C# program that
          looks like the native Win32 LOGFONT structure, that would work. I haven't
          tried it myself, but it seems to me that until you have, dismissing the
          Win32 reference is premature. :)
          >
          I think it's odd that there's not a built-in structure that can be used,
          but the lack of one shouldn't stop you from experimenting a little. :)
          >
          Pete

          Comment

          Working...