home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.windows.x:16099 comp.graphics:9417
- Path: sparky!uunet!ogicse!news.u.washington.edu!milton.u.washington.edu!bolson
- From: bolson@milton.u.washington.edu (Ed Bolson)
- Newsgroups: comp.windows.x,comp.graphics
- Subject: Rubber banding/overlays on grayscale in X-windows
- Message-ID: <1992Sep3.170048.29066@u.washington.edu>
- Date: 3 Sep 92 17:00:48 GMT
- Article-I.D.: u.1992Sep3.170048.29066
- Sender: news@u.washington.edu (USENET News System)
- Organization: University of Washington, Seattle
- Lines: 30
-
- We are developing software on 8-bit displays that necessitate
- displaying a gray-scale image in an X-window and then performing
- "rubber-banding" of overlaid lines in the image. Traditionally, this
- is done by the XOR operation.
-
- However, XOR works poorly if you wish to display your overlay in a
- single color.
-
- Are there obvious methods of displaying overlaid data on an image under X?
-
- I have thought of using CopyArea to replace the image (effectively erasing the
- overlay each time) and then redrawing. This could cause high
- communications costs over the "X-wire", as we are often going to draw
- spline-based curves rather than straight lines or arcs.
-
- Another thought was 2 offscreen pixmaps. One with the image, and the
- other would have the current copy of the overlay. However, I have not
- come up with logic that will copy only the non-0 pixels of the overlay
- onto the image.
-
- Any help would be greatly appreciated.
-
- Thanks,
-
- Ed
- --
- Ed Bolson
- University of Washington Cardiovascular Research (206)543-4535
- bolson@u.washington.edu (preferred)
- bolson@max.bitnet bolson@milton.u.washington.edu (if you must)
-