@begin(header)
author: ackerman=ag@.ics.uci.edu
show_author: ShowNone
author_organization: Harvard X Class
node_expert: ackerman=ag@ics.uci.edu 
expiration_date: 10/17/93
last_modifier: ackerman=ag@.ics.uci.edu
last_mod_date: 10/17/91
mod_num: 1
@end(header)
@begin(Q)
I've been trying to create several graphics contexts (GCs) for the
same drawable.  However it seems that only the first one is
created.  Is more than one graphics context per drawable allowed,
or do I need to keep changing the attributes of the same graphics
context to draw different features? 
@end(Q)

@begin(A)
> Is more than one graphics context per drawable allowed,

Yes, but unless you change some attributes, they will all appear to
be the same.  That is, all of the GCs will have the default
attributes.  If you wanted to have a line width of 5, say, you
would need to change the line width attribute of some GC.

> do I need
> to keep changing the attributes of the same graphics context

You can do this, but it is not necessary.  You can have multiple
GCs.

> I've been trying to create several graphics contexts (GCs) for the
> same drawable. 

You may have a slight misunderstanding here.  The GCs aren't
really tied to any drawable.  The parameters of the Xlib routine
are unfortunate for teaching purposes - all the routine is doing
is pulling the visual type out of the drawable (to say what kind
of GC) - but you can use that GC with any drawable of the same
type (all windows for you).  It would be better to say "I've been
trying to create several GCs) *with* the same drawable."  I
correct this only in case you have this misunderstanding.

> However it seems that only the first one is created.

Are you getting back different resource id's?  The resource id is
the value returned by the XCreateGC call.  Try printing them out.
If the numbers are different, you are creating multiple GCs.
@end(A)
