"Riswick, J.G.A. van" <J.G.A.v.Riswick_at_tue.nl> writes:
> HI
>
> I'm trying to make a 'shadowed' title bar text for fvwm2
> which should look like so:
>
> http://www.xs4all.nl/~josvanr/shadowtext.png
>
> So I first want to draw the text in a dark color, and
> then shifted over one pixel diagonally, draw it in a light color.
> I tried to use the shadow gc for this:
> if(t->name != (char *)NULL) {
>
> XDrawString(dpy, t->title_w, sgc, hor_off+1,
> t->title_font.y + 2, t->name, strlen(t->name));
>
> XDrawString(dpy, t->title_w, Scr.TitleGC, hor_off,
> t->title_font.y + 1, t->name, strlen(t->name));
> }
>
>
>
> (border.c, line 1337)
>
> but it doesn't display correctly, the shadow gc seems to have
> the wrong font:
I believe the problem is that "sgc" hasn't been prepared to
use the titlebar font.
I was able to get this to work by storing the shadow color
in the common_decorations_type structure in
get_common_decorations and then using this:
XSetForeground(dpy, Scr.TitleGC, cd->shadow_color);
XDrawString(dpy, t->title_w, Scr.TitleGC, hor_off+1,
t->title_font.y + 2, t->name, strlen(t->name));
XSetForeground(dpy, Scr.TitleGC, cd->fore_color);
XDrawString(dpy, t->title_w, Scr.TitleGC, hor_off,
t->title_font.y + 1, t->name, strlen(t->name));
--
Dan Espen
444 Hoes Lane Room RRC 1C-214 E-mail: dane_at_mk.telcordia.com
Piscataway, NJ 08854 Phone: (732) 699-5570
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Mon Nov 19 2001 - 08:59:54 GMT