Help Rotating Text

J

Jonathan Wood

I'd like to print some text at an angle. I was able to get
Graphics.RotateTransform() 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.WindowsCE, could they
please explain why, when I'm not currently developing for CE?

Thanks for any advice.
 
P

Peter Duniho

I'd like to print some text at an angle. I was able to get
Graphics.RotateTransform() 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
 
J

Jonathan Wood

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.WindowsCE, I would
like to know why.

Still looking for an example...

Thanks.
 
P

Peter Duniho

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
 
J

Jonathan Wood

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top