Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » [ images - text drawing ] rotated text?
[ images - text drawing ] rotated text? [message #374192] Tue, 23 September 2003 15:16 Go to next message
Eclipse UserFriend
Originally posted by: v.j.b

Hi all,

after reading the various articles on the eclipse website, i found myself
wondering; is there any way to render rotated text with SWT? Just like on
Win32, with the 'CreateFontIndirect()' API's, where you can set an angle.

If not, I think the same could be done by rendering the text unrotated, on
an offscreen image, and then rotating that image. Not as elegant as rotating
the text, but it'll do. But I couldn't find any info on rotating images
either.

any help is greatly appreciated,

cu v
Re: [ images - text drawing ] rotated text? [message #374521 is a reply to message #374192] Thu, 25 September 2003 14:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: v.j.b

no one?

"varname" <v@j.b> wrote in message news:bkpo0t$cqm$1@eclipse.org...
> Hi all,
>
> after reading the various articles on the eclipse website, i found myself
> wondering; is there any way to render rotated text with SWT? Just like on
> Win32, with the 'CreateFontIndirect()' API's, where you can set an angle.
>
> If not, I think the same could be done by rendering the text unrotated, on
> an offscreen image, and then rotating that image. Not as elegant as
rotating
> the text, but it'll do. But I couldn't find any info on rotating images
> either.
>
> any help is greatly appreciated,
>
> cu v
>
>
Re: [ images - text drawing ] rotated text? [message #374524 is a reply to message #374521] Thu, 25 September 2003 15:03 Go to previous messageGo to next message
Ralf Koban is currently offline Ralf KobanFriend
Messages: 319
Registered: July 2009
Senior Member
Hi v,

Well as I think you have to reposition every pixel according to its
relative current position and wanted angel. I don't know if there exists
such a method but I remember that there was a thread in that newsgroup
asking exactly the same.

Ralf

varname schrieb:

> no one?
>
> "varname" <v@j.b> wrote in message news:bkpo0t$cqm$1@eclipse.org...
>
>>Hi all,
>>
>>after reading the various articles on the eclipse website, i found myself
>>wondering; is there any way to render rotated text with SWT? Just like on
>>Win32, with the 'CreateFontIndirect()' API's, where you can set an angle.
>>
>>If not, I think the same could be done by rendering the text unrotated, on
>>an offscreen image, and then rotating that image. Not as elegant as
>
> rotating
>
>>the text, but it'll do. But I couldn't find any info on rotating images
>>either.
>>
>>any help is greatly appreciated,
>>
>>cu v
>>
>>
>
>
>
Re: [ images - text drawing ] rotated text? [message #444215 is a reply to message #374521] Fri, 08 October 2004 18:09 Go to previous messageGo to next message
Matt Casters is currently offline Matt CastersFriend
Messages: 2
Registered: July 2009
Junior Member
Draw it in Java2D and then convert the resulting image to SWT.
I have some code hanging around (somewhere) for the conversion if you're
interested.

Matt


"varname" <v@j.b> schreef in bericht news:bkuv6h$94j$1@eclipse.org...
> no one?
>
> "varname" <v@j.b> wrote in message news:bkpo0t$cqm$1@eclipse.org...
>> Hi all,
>>
>> after reading the various articles on the eclipse website, i found myself
>> wondering; is there any way to render rotated text with SWT? Just like on
>> Win32, with the 'CreateFontIndirect()' API's, where you can set an angle.
>>
>> If not, I think the same could be done by rendering the text unrotated,
>> on
>> an offscreen image, and then rotating that image. Not as elegant as
> rotating
>> the text, but it'll do. But I couldn't find any info on rotating images
>> either.
>>
>> any help is greatly appreciated,
>>
>> cu v
>>
>>
>
>
Re: [ images - text drawing ] rotated text? [message #444221 is a reply to message #444215] Fri, 08 October 2004 20:42 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
For an swt-only example of rotating an image see
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet139.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup .
If text is drawn to an swt image then this should be useful.

Grant

"Matt Casters" <matt.casters@ibridge.be> wrote in message
news:ck6l7i$i2q$1@eclipse.org...
> Draw it in Java2D and then convert the resulting image to SWT.
> I have some code hanging around (somewhere) for the conversion if you're
> interested.
>
> Matt
>
>
> "varname" <v@j.b> schreef in bericht news:bkuv6h$94j$1@eclipse.org...
> > no one?
> >
> > "varname" <v@j.b> wrote in message news:bkpo0t$cqm$1@eclipse.org...
> >> Hi all,
> >>
> >> after reading the various articles on the eclipse website, i found
myself
> >> wondering; is there any way to render rotated text with SWT? Just like
on
> >> Win32, with the 'CreateFontIndirect()' API's, where you can set an
angle.
> >>
> >> If not, I think the same could be done by rendering the text unrotated,
> >> on
> >> an offscreen image, and then rotating that image. Not as elegant as
> > rotating
> >> the text, but it'll do. But I couldn't find any info on rotating images
> >> either.
> >>
> >> any help is greatly appreciated,
> >>
> >> cu v
> >>
> >>
> >
> >
>
>
Previous Topic:Howto parse Keys from keyCode Integer?
Next Topic:How to add information to a list
Goto Forum:
  


Current Time: Sat Oct 31 08:29:57 GMT 2020

Powered by FUDForum. Page generated in 0.01648 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top