Title: | DECWINDOWS 26-JAN-89 to 29-NOV-90 |
Notice: | See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit |
Moderator: | STAR::VATNE |
Created: | Mon Oct 30 1989 |
Last Modified: | Mon Dec 31 1990 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3726 |
Total number of notes: | 19516 |
I'm trying to include an area cut/copy/paste function into a program and I'd like it to work in a way similar to DECpaint. My first attempt was to copy the selected area to a pixmap and then use XCopyArea, and along with a GC with funcion = GXxor, to move it around on the drawing canvas. It worked, and was fast - but you have the problem of getting inconsistent results dragging around due to XOR'ing with different color backgounds. I thought I had the problem licked yesterday. I scratched the above and instead created a window widget, copied the selected area to the widget, and then used XtSetValues to move the widget. It worked great - on my DECstation 3100. When I tryed in on my GPX/II this morning - what a dog! DECpaint runs circles around it (so would my daughter's pet snail). Since I've tryed a few other things to speed it up, including setting the widgets background pixmap to None to inherit the pixel data under the window, using a window instead of a widget and moving it with XMoveWindow, and even grabbing the server (getting desperate!). Can't get any improvement in performance. Does anybody have any ideas about this? DECpaint does it - and apparently is using a window or window widget from watching its behavior. This is the last piece in a program that I need to use as an example in a class that I'm teaching - in a week... Any help would be appreciated (not to mention benificial to my sanity!). Ron
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
2191.1 | Possibilities | DEMON::BURLEIGH | Fri Feb 02 1990 21:56 | 14 | |
Ron, You might try using a window and moving it with XMoveWindow rather than a window widget and XtSetValues. It will be faster, but perhaps not fast enough for a GPX. How is the underlying window's data being managed? If it's maintained in a pixmap, then I would allocate a new pixmap for the piece to be dragged, and try doing the dragging with XCopyArea and GXcopy, while restoring pixels in the wake of the dragged area with XCopyArea from the backing pixmap. Dave | |||||
2191.2 | Maybe the second... | EXLIB::DLUGOSZ | Open foot, Insert Mouth | Sat Feb 03 1990 10:20 | 8 |
Hi Dave, I was wondering if you were still out there. I already tried the first suggestion - still way too slow on the GPX. The second one sounds interesting...I'll give it a try Monday. Thanks, Ron |