473,396 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Help Rotating Text

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.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com

Jul 23 '07 #1
4 2227
On Sun, 22 Jul 2007 18:09:07 -0700, Jonathan Wood <jw***@softcircuits.com>
wrote:
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
Jul 23 '07 #2
Peter,
See http://msdn2.microsoft.com/en-us/library/ms533931.aspx
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.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com

Jul 23 '07 #3
On Mon, 23 Jul 2007 10:17:55 -0700, Jonathan Wood <jw***@softcircuits.com>
wrote:
Peter,
>See http://msdn2.microsoft.com/en-us/library/ms533931.aspx

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
Jul 23 '07 #4
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
http://www.softcircuits.com
"Peter Duniho" <Np*********@nnowslpianmk.comwrote in message
news:op***************@petes-computer.local...
On Mon, 23 Jul 2007 10:17:55 -0700, Jonathan Wood <jw***@softcircuits.com>
wrote:
>Peter,
>>See http://msdn2.microsoft.com/en-us/library/ms533931.aspx

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
Jul 23 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

31
by: Royal Denning | last post by:
I am designing a table with 2 columns and 20 rows. I want to insert small images (each with a link) and a text title in each cell of the table. On refresh of the page, I would like to have the...
14
by: mikeoley | last post by:
Why would this script below work on an html page: http://www.eg-designdev.com/aircylinders/test.htm But not a java page such as this: "http://www.eg-designdev.com/aircylinders/index3.jsp" Or...
2
by: sgMuser | last post by:
Hi, I am not a good developer of Javascript codes. Needs this help to make some modification to this famous free javascript from Anarchos. i am using this in one of my webpage. What it does is,...
2
by: mistral | last post by:
I want place custom text rotating around analogue clock. Here is javascript that is clise to my task: http://javascript.internet.com/time-date/mousetrailclock.html But it have a few...
9
by: Kraken | last post by:
Hi, i have an assignment to open PPM images and prompt the user for either brightening, flipping or rotating the image. Ive done the brightening and flipping, but i cant get the rotating to work....
3
by: avalence | last post by:
Hello, I am trying to create a nice rotating earth globe (on mouse) on my web site, in order to display my professional relationships all over the world. The best way seems to be a javascript. In...
1
by: AR123 | last post by:
Hi I want to set up a rotating banner. Not sure how to incorporate my rotating banner code into the code below. I want the rotating banner to be the main feature image? This is set up in...
5
by: ibid | last post by:
hi every one just wondering if anyone could help sorry if i seem abit dumb but im a newbie to it all ive got to asign a mail program on my auction site in the config.pl files (i think this is the...
6
by: swethak | last post by:
Hi, I displayed the image taken from database.How to raotate that image using javascript.plz tell that how to start the logic.plz tell that some reference websites.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.