Re: HOW use graphics contexts in MULTIPLE drawing areas?!?!?!?



Owen (sent to GTK+ list as well this time :)

Thanks so much for your emails!! I am almost
done with the first GUI app of my life and
you helped me get that much closer to being done.

Can I ask you a clarifying question about your
response???

You said I could use GdkGC* object with any
drawable using the same colormap.  How
does one *"assign"* a colormap to a drawable???
I just created a colormap and added colors
to it.  I didn't do ANYTHING else to this
colormap thing.

...

Also, if GdkGC* is ONLY tied to colormap then
why does gdk_gc_new require a DRAWABLE as the
argument???  I think having the COLORMAP to
be the argument to gdk_gc_new would make MORE
sense don't you???

Perhaps some macro like following I'm imagining:


===> gdk_gc_new(GDK_GET_COLORMAP(drawingArea->window));

Just a thought.

Thanks again,

Chris



On Mon, Mar 25, 2002 at 03:37:28PM -0500, Owen Taylor wrote:
> 
> Christian Seberino <seberino spawar navy mil> writes:
> 
> > GdkGC* gc = gdk_gc_new(drawingArea->window);
> > 
> > You'll notice line above needs an argument that is a
> > drawing area window.  What if I want to use 
> > same graphics context in lots of drawing areas?!?!?!?
> > 
> > 
> > e.g. if I define a graphics context for color
> > red then why define HUNDREDs of "reds" one for
> > every drawing area?!?!?!
> 
> You can use a GdkGC with any other drawable (window or pixmap)
> with the same colormap.
> 
> Regards,
>                                         Owen

-- 
=======================================================
| Dr. Christian Seberino  || (619) 553-7940  (office) |
| SPAWARSYSCEN 2363       || (619) 553-2836  (fax)    |
| 53560 HULL ST           ||                          |
| SAN DIEGO CA 92152-5001 || seberino spawar navy mil |
=======================================================



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]