Re: Pixmap question
- From: John Cupitt <john cupitt ng-london org uk>
- To: Colin Thomas <colin designresources co uk>
- Cc: gtk-list gnome org
- Subject: Re: Pixmap question
- Date: Thu, 11 Jan 2001 15:43:03 +0000
Colin Thomas wrote:
> If I read it correctly, it seems you can overlay pixels on existing pixels
> ANDing the colour ? (Which is what I am after...)
Hiya, you can use this ... you'd have to:
- have an off-screen pixmap on the server for each layer in your view
- on redraw (eg. on layer delete), AND all your layers together to make
another off-screen pixmap
- repaint the window by blitting from your combined view to the screen
This is going to be rather slow, and will eat up memory inside the
server. For example, on a scroll, you'll have to ship a whole new set of
pixmaps over to the server.
I think a better technique is to do this in your application. Do the AND
yourself to a big array, then paint the window with gdkrgb. Less network
traffic (maybe), less memory use (certainly).
> I also would like to have dashed lines in rectangles et al. There seems to
> be the following, but again can it be used in gdk: I assume somehow it is
> called in the GC which the rectangle is drawn in ?? (Either of my 2 gtk+ books
> go into this depth)
>
> ############################################
> typedef enum
> {
> GDK_LINE_SOLID,
> GDK_LINE_ON_OFF_DASH,
> GDK_LINE_DOUBLE_DASH
> } GdkLineStyle;
> ############################################
The best place to look is a book on xlib programming - the gdk calls are
almost identical.
HTH, John
--
John Cupitt, john cupitt ng-london org uk, +44 (0)20 7747 2570
VASARI Lab, The National Gallery, Trafalgar Square, London, WC2N 5DN
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]