[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Xlib problems (Lol. I've only been programming in it for 10 days...)
Maybe I got the question wrong ...
... again ;)
But why don't you just create an XImage
and put the data ino XImage->data ?
You must however make sure that you use the right format.
(Depending on your system.)
The just do an XPutImage.
If you really need speed. Well, use DGA.
Or use share memory.
For shaped windows, try
man XShape[CombineMask|CombineRectangles|CombineRegion|........]
or just man -k shape
ciao
Anti
ps:
Sorry, I'm very busy ... my TP9 entry is just 2.5Kloc ....
Shadow Mint <shadowmint@mailcity.com> on 12/14/99 11:07:51 AM
Please respond to linuxgames@sunsite.auc.dk
To: linuxgames@sunsite.auc.dk
cc: (bcc: Andreas Neukoetter/Germany/IBM)
Subject: Xlib problems (Lol. I've only been programming in it for 10 days...)
Greetings!
Currently I'm working on an RTS engine, writing the GUI code; in Xlib.
It's all working fine, etc. and now I'm stuck with a problem none of the
books I have seem to address. How do I draw a coloured image to the
screen?
The only way of doing it I've come across so far has been, basically;
make an XImage, and use XPutPixel to put the pixel values in, one at a
time, then XPutImage to draw to the window (or pixmap in my case). Can
anyone help / point me to a tutorial for this stuff? I can't find a
thing.
(Nb. Color allocation stuff in Np. I have at least 3 books on X with
colors. But they only seem to cover allocating colors, or using planes,
which'd be stupid for a picture with >500 different colors.)
In case you're interested, what I'm doing is maintaining a window size
pixel map, I draw into for every thing, which gets a region clip mask to
the GC to make updates quicker. Updates are done by XFlush approx 30
times / second, or for any window expose / whatever events. Ideally. ;)
....And since I'm asking how do I make pieces of my main window
transparent (ie. you can see the desktop behind it in the window).
Thanks!
Shadow Mint.
---------------------------------------------------------------------
To unsubscribe, e-mail: linuxgames-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: linuxgames-help@sunsite.auc.dk