l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
December 2: Social Gathering
Next Installfest:
TBA
Latest News:
Nov. 18: Officers elected
Page last updated:
2002 Jun 05 19:09
Events
 Meetings
 Installfests
 Demos
 Photos
Services
 Library
 LERT
 Jobs
 Documents
Interact
 Mailing Lists
 - Search
 - Archives
 Chat (IRC)
 Social Networks
About Us
 Members
 Projects
 Testimonials
 Call for Speakers
 Why Not MS?
 Finances
 Sponsors

^Home
?Search
?News & RSS
?Calendar
@Contact Us
$Buy Stuff
=Printable


The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
[vox-tech] xlib/gdk questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vox-tech] xlib/gdk questions



a few Xlib/Gdk questions...



1: colormaps
============
when an xlib book talks about a colormap, is it talking about something
which is global in scope?  something that's shared by all Windows?  is
it determined by the graphics card?

or something which exists for each Window on a display?



2: visuals
==========
same question for a visual.  a visual describes how pixel colors are
interpreted -- whether we use a colormap (1, 8, 16 bpp) or a true RGB
triplet (24, 32 bpp).   this makes it sound like there's one visual for
each server, since depth information should be the same for all Windows.
yet from reading, it sounds like each Window has a visual.  what's the
deal?

btw, what exactly is 32bpp?  how can any true-color color map have a
depth that's not divisible by 3?  doesn't each color goes from 0 to FF?
what are the extra bits used for?



3: Graphics Contexts and Color
==============================
suppose i want to do some plotting in Xlib or Gdk.  suppose my plot has
1000 colors.   do i really have to:

  1. allocate a color.  1000 times.
  2. declare 1000 graphics contexts

that seems more than painful; it's masochistic.   is this what someone
needs to do to draw a picture that contains 1000 colors?

pete

ps - of course, by "Window" i mean an Xlib "Window *window" in this email.
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
facebook
LUGOD Group on Facebook

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
1105 Kennedy Place, Suite 1, Davis, CA 95616
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
No Starch Press
For book donations.