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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Ralf Koban 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 |
Matt Casters 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 |
Grant Gayed 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
> >>
> >>
> >
> >
>
>
|
|
|
Goto Forum:
Current Time: Thu Apr 25 12:13:09 GMT 2024
Powered by FUDForum. Page generated in 0.03839 seconds
|