Qt-interest Archive, February 2007
Font with shadow
Message 1 in thread
Hello guys,
I'd like to display a font with a shadow in QT, any idea?
Ben.
--
[ signature omitted ]
Message 2 in thread
Sure, get yourself a font with a shadow. ;-)
Guido
On Tue, Feb 20, 2007 at 12:18:30PM +0100, bunjeee wrote:
> Hello guys,
>
> I'd like to display a font with a shadow in QT, any idea?
>
> Ben.
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
--
[ signature omitted ]
Message 3 in thread
Got an idea, but that needs a long way round...
Take the labels rect, a look at
http://zrusin.blogspot.com/2006/08/shadows.html and, if needed, a look
at grabWindow() or grabWidget() and you'll know how to draw nice
shadows. Ok, these are really extraordinary charges to draw a simple
font, but it will work. :-P
Regards, Clemens
Guido Seifert wrote:
> Sure, get yourself a font with a shadow. ;-)
>
> Guido
>
> On Tue, Feb 20, 2007 at 12:18:30PM +0100, bunjeee wrote:
>
>> Hello guys,
>>
>> I'd like to display a font with a shadow in QT, any idea?
>>
>> Ben.
>>
>> --
>> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
>> "unsubscribe" in the subject or the body.
>> List archive and information: http://lists.trolltech.com/qt-interest/
>>
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>
Message 4 in thread
bunjeee ha scritto:
> Hello guys,
>
> I'd like to display a font with a shadow in QT, any idea?
>
> Ben.
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>
What type of shadow?
For example, you can use the QPainter to paint the text in gray and then
you can paint the text in real color moving it some pixel away to create
the impression of a shadow.
--
[ signature omitted ]
Message 5 in thread
> What type of shadow?
> For example, you can use the QPainter to paint the text in gray and then
> you can paint the text in real color moving it some pixel away to create
> the impression of a shadow.
Nevertheless, the easiest way really is to use a font with a shadow:
http://www.fontage.com/shadow.html
Don't say this is the cheapest way. ;-)
Guido
--
[ signature omitted ]
Message 6 in thread
"bunjeee" <bunjeee@xxxxxxx> wrote in message
news:erele5$5gb$1@xxxxxxxxxxxxxxxxxxxxx
> Hello guys,
>
> I'd like to display a font with a shadow in QT, any idea?
>
> Ben.
I'd just draw the text twice, once with a dark pen with an alpha-value <
255, and then again with the actual color and full opacity. The first
drawing would obviously have some pixels offset.
Volker
--
[ signature omitted ]