T.R | Title | User | Personal Name | Date | Lines |
---|
2675.1 | | PSW::WINALSKI | Careful with that VAX, Eugene | Fri Apr 27 1990 16:33 | 8 |
| Probably because there's a visual depth mismatch. On a monochrome system,
everything is going to have a depth of 1. On a color system, bitmaps still
have a depth of 1, but the default visual depth is 8. You didn't show us the
pixmap and gc parameters, so it's hard to tell from your code fragment.
The fact that your XCreateImage call says XYBitmap rather than XYPixmap format
is suspicious.
--PSW
|
2675.2 | more ... | HKOVC::TERENCE | From Middlesex, UWO | Tue May 01 1990 01:44 | 13 |
| Re: -1
I have
gc.foreground = BlackPixelOfScreen(...
gc.background = WhitePixelOfScreen(...
How does X treat the 1's and 0's in a Bitmap/Pixmap? If I specify
XYPixmap in the XCreateImage call, I got the image printed in reverse
video. Why?
Thanx
-Terry
|
2675.3 | It's kind of like CopyPlane vs CopyArea | DECWIN::FISHER | Prune Juice: A Warrior's Drink! | Tue May 01 1990 17:34 | 8 |
| If you specify XYPixmap, the bits you give it are copied into the pixmap. If
you say XYBitmap, the bits you pass in are used as selectors. A 1 will put
the foreground color into the pixmap; a 0 will put the background color.
Note that you can do a PutImage of a 1-bit deep image into a multi-deep pixmap
that way. In fact, the image you specify *must* be 1 deep for XYBitmap.
Burns
|
2675.4 | more ... | HKOVC::TERENCE | From Middlesex, UWO | Wed May 02 1990 00:50 | 12 |
| 1) When I create a Pixmap, will all the planes be automatically filled
up with 0's?
2) A XYPixmap's 0 means black and a XYBitmap's 0 means background
color?
3) What happens if I XCreateImage with depth > 1 and the image data
only has depth 1?
4) What happens if I XPutImage such an image into a Pixmap of depth >
1?
Thanx a lot
-Terry
|
2675.5 | RTXB | DECWIN::KLEIN | | Wed May 02 1990 15:42 | 16 |
| > 1) When I create a Pixmap, will all the planes be automatically filled
> up with 0's?
"The initial contents of the pixmap are undefined." (page 93)
> 2) A XYPixmap's 0 means black and a XYBitmap's 0 means background
> color?
Neither. I think it just means "0", the value of which depends
on the colormap used when the pixmap is displayed.
I'm not sure about (3) and (4), but I'm sure the answers are somewhere in
"X Window System" (Scheifler, et. al.). If you don't have this book,
you should go out TODAY and get it!
-steve-
|
2675.6 | Read this while on the bus to get the book... | DECWIN::FISHER | Prune Juice: A Warrior's Drink! | Wed May 02 1990 18:19 | 22 |
| 2) A XYPixmap's 0 means black and a XYBitmap's 0 means background
color?
***Steve is right about XYPixmap. 0 means display a pixel value of 0.
***This may be black, but don't count on it. You HAVE to have any
***pixel values you use defined in the colormap.
***You are correct about XYBitmap's 0 meaning background.
3) What happens if I XCreateImage with depth > 1 and the image data
only has depth 1?
***XCreateImage is a routine which creates a data structure which
describes the image data. If you tell it depth >1 and the data is
really only 1, you have a broken descriptor. X will act as though
the data is deep, but since it is not, you will probably get a mush
of garbage on the screen (if anything).
4) What happens if I XPutImage such an image into a Pixmap of depth >
1?
****See .3.
****Burns
|
2675.7 | more on "X Window System" | HKOVC::TERENCE | From Middlesex, UWO | Wed May 02 1990 22:15 | 6 |
| Could you guys give me detail about the book? Like which publisher,
what edition, and what order number?
Thanx
-Terry
|
2675.8 | Scheifler, Gettys and Newman | KOBAL::SCHOELLER | Schoeller - Failed Xperiment | Wed May 02 1990 23:33 | 15 |
| I am sitting at home so I don't have the order number but, the book is
The X Window System - C Language Reference and Protocol Manual
Scheifler, Gettys and Newman
Digital Press
Since we publish it, you can get a really cheap price internally. If you
need it quick you may have to buy it from a bookstore (perhaps at a local
university).
This is the big maroon, paperback book with the X logo on the cover. The
authors were the original developers of X (Scheifler is still with the X
Consortium). It is therefore quite authoritative.
Dick
|
2675.9 | Book info... | GSRC::WEST | Variables don't, Constants aren't | Thu May 03 1990 10:50 | 19 |
|
X Window System: C Library and Protocol Reference
Digital Press
Order Number : EY-6737E-DP
ISBN : 1-55558-012-2
About $27.50 + tax for Digital employees.
Another highly recommended book is
"Introduction to the X Window System"
Oliver Jones
Prentice-Hall
ISBN : 0-13-499997-5
-=> Jim <=-
|
2675.10 | How to order? | HKOVC::TERENCE | From Middlesex, UWO | Fri May 04 1990 04:39 | 4 |
| Sorry, but one more question. How can I order it? Can I order it by
EMail?
-Terry
|
2675.11 | here's my story... | GSRC::WEST | Variables don't, Constants aren't | Sun May 06 1990 21:08 | 23 |
|
I'm not sure about E-mail. I just sent them a check and they sent me the
book. I bought it as a Digital employee and not a cost center.
You will probably need to call them to find out the current price of the
book. Since you are a Digital employee, you get the book for 50% of the
cover price. The tax you add depends on your locale. Here in Colorado
Springs the tax is 6.7%, so this is what I had to add to the price of the
book.
I apologize, but I don't have their number or address handy. Maybe someone
else does.
If you can get your cost center to buy the book, then the procedure is the
same as ordering any documentation. This way, however, seems to take longer.
I received my book in about 10 days via UPS after placement of order.
As for the "Introduction to..." book, any _good_ bookstore should either have
it or can order it for you. I think's it's price was somewhere between $25
and $30.
-=> Jim <=-
|