Thread View: mail.xpert
1 messages
1 total messages
Started by Daniel Dee
Wed, 27 Feb 1991 02:57
Question (Bug?) in XCopyArea
Author: Daniel Dee
Date: Wed, 27 Feb 1991 02:57
Date: Wed, 27 Feb 1991 02:57
49 lines
2621 bytes
2621 bytes
I wonder if anybody can give me some insight into this. Or maybe
tell me if it is a bug.
I am using XCopyArea to copy a region in a window into a pixmap
and then to copy it back from the pixmap to the window. The problem
I am encountering is this: the region is being copied onto the
window with a black band on top and on the right side of the
pixmap exactly equal in size to the position of the origin of
the window from the upper-left hand corner of the screen.
That is,
Pixmap Screen
+------+ +-----------------------------+
| | | Window |
| | | +-----------------+ |
| | | | | | |
+---|--+ | | +------+ | |
| | | |XXXXXX| | |
+-XCopyArea------>|X +---| | |
| | |X | | | |
| | +------+ | |
| +-----------------+ |
| |
| |
| |
+-----------------------------+
If the origin of the Window is (X,Y) from the upper-left hand corner
of the Screen, then the copied Pixmap will leave a band (shown as
XXXXX region in the diagram above) on the left with width X,
and top with height Y.
The rest of the Pixmap seems to copy correctly. As far as I can tell,
I am not doing anything wrong. All I can figure out is that
XCopyArea thought that Pixmap is the Window and like the
Window, it is offset (X,Y) from the origin of the Screen. It then
thinks that the region from (0,0) to (X,Y) on the Pixmap is outside
the valid display region, which is true for the Window and not
for the Pixmap. Hence only the region starting from (X,Y) of the
Pixmap is copied onto the window by XCopyArea.
Am I wrong? If I am right, then this seems like a bug.
Anybody has any idea. Any insight will be appreciated.
Thank you.
-- Daniel (ddee@vicorp.com)
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads