RE: drawing lines (help please)
- From: "Hugues Bernard" <hugo bernard worldonline fr>
- To: <gtk-list gnome org>
- Cc: "Mike Holme" <M Holme mmu ac uk>
- Subject: RE: drawing lines (help please)
- Date: Wed, 14 Mar 2001 18:58:39 +0100
> I'm finding it hard to find a simple example of drawing coloured
> lines.
<snip>
> My current code looks like this :-
>
> gdk_draw_line(widget->window, widget->style->black_gc, x1, y1, x2, y2);
what you need has to deal with gc's (graphics context)
(see the gdk reference manual)
1. Create a GdkGC (say mygc)
2. Create and allocate a GdkColor
3. Assign it to the foreground
and use it like
gdk_draw_line(widget->window, mygc, x1, y1, x2, y2);
ciao
Hugues
NB: if it doesnt help you, tell me, I had code example, but not right now ;-)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]