Re: Pixmap question
- From: Colin Thomas <colin designresources co uk>
- To: gtk-list gnome org
- Subject: Re: Pixmap question
- Date: Thu, 11 Jan 2001 13:44:49 +0000 (GMT)
Hi ,
I have gone some hunting around, and have found a reference to the following
in gdktypes.h:
############################################
/* GC function types.
* Copy: Overwrites destination pixels with the source pixels.
* Invert: Inverts the destination pixels.
* Xor: Xor's the destination pixels with the source pixels.
* Clear: set pixels to 0
* And: source AND destination
* And Reverse: source AND (NOT destination)
* And Invert: (NOT source) AND destination
* Noop: destination
* Or: source OR destination
* Nor: (NOT source) AND (NOT destination)
* Equiv: (NOT source) XOR destination
* Xor Reverse: source OR (NOT destination)
* Copy Inverted: NOT source
* Xor Inverted: (NOT source) OR destination
* Nand: (NOT source) OR (NOT destination)
* Set: set pixels to 1
*/
typedef enum
{
GDK_COPY,
GDK_INVERT,
GDK_XOR,
GDK_CLEAR,
GDK_AND,
GDK_AND_REVERSE,
GDK_AND_INVERT,
GDK_NOOP,
GDK_OR,
GDK_EQUIV,
GDK_OR_REVERSE,
GDK_COPY_INVERT,
GDK_OR_INVERT,
GDK_NAND,
GDK_SET
} GdkFunction;
############################################
If I read it correctly, it seems you can overlay pixels on existing pixels
ANDing the colour ? (Which is what I am after...)
Is this the correct way it was intended? If so has anyone used the above,
and how in gtk+ ?
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;
############################################
Many thanks in advance...
Colin Thomas
------------- Begin Forwarded Message -------------
Date: Tue, 09 Jan 2001 11:49:54 -0800
From: "Timothy M. Shead" <tshead k-3d com>
User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; m18) Gecko/20001115
X-Accept-Language: en
MIME-Version: 1.0
To: Paul Barton-Davis <pbd Op Net>
Cc: Colin Thomas <colin designresources co uk>, gtk-list gnome org
Subject: Re: Pixmap question
Content-Transfer-Encoding: 7bit
Paul Barton-Davis wrote:
>> I need to develop Display window which can a number of coloured layers.
>> ( the various layers used in IC design).
>>
>> Where each layer overlaps another, I want to see the correct ANDING of
>> the colours.
>>
>> I need to be able to repaint with an odd layer removed from display.
>>
>> I can see that if I have multiple pixmaps (one for each layer to be
>> displayed), but just sending the desired pixmaps to the screen I should
>> be able to achieve this.
>
>
> 1) I believe that no part of X (or GDK) current supports such
> things. This generally goes by the name "alpha channel", and X
> doesn't support it. A pixel in a Drawable is either completely
> transparent or completely opaque (with its own particular color).
>
The X Render extension should support these types of operations (with
hardware support, when available). However, you're talking about
bleeding edge (it only just appeared in XFree86 4.0.2) X calls - no
support from GTK+, etc. Check out the release notes and link at
http://www.xfree86.org
Regards,
Tim
------------- End Forwarded Message -------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Colin Thomas.
| Design Consultant.
|
| Email : colin designresources co uk
| Tele : (44) 1234 240562
| Fax : (44) 1234 241262
|
| Address : Design Resources,
| 27 Market Place,
| Olney,
| Buckinghamshire,
| United Kingdom.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]