comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » DirectColor on linux
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: DirectColor on linux [message #18047 is a reply to message #17993] Wed, 24 November 1999 00:00 Go to previous messageGo to previous message
J.D. Smith is currently offline  J.D. Smith
Messages: 214
Registered: August 1996
Senior Member
Vincent FAVRE-NICOLIN wrote:
>
> David Fanning wrote:
>
>> Vincent Favre-Nicolin (favre@polycnrs-gre.fr) writes:
>>
>>> Well, I woul like very much not using XOR, but then
>>> I would have to redisplay the image (they can be up to 5000x3500,float)
>>> each time I add some text on it. A bit time and memory-consuming...
>>
>> Well, not really. With Device Copy you can repair just
>> that portion of the window that you drew something on.
>> That is usually an extremely small region (e.g., a
>> selection box, maybe). This is absolutely lickity-split.
>> It takes no time at all. Even on a 5000 x 3500 image. :-)
>
> The problem is that I am working on X-Ray diffraction images, for which
> I have to index each reflections, ie I must append a small box and three
> integers to 50 to 300 dots on the image. These reflections do cover quite a
> fair amount of the image, so that copying each small zone isn't very
> convenient nor efficient in that case.
> To produce readable text on the image, I have divided the private,
> 256-colors table in two halves, the lower being used to display the
> diffracted intensities (grayscale), and the upper half of the color table is
> a one-color zone, so that text written using XOR appears in that color. That
> works, although I do not consider this very nice code. But I really cannot
> keep a copy of all or parts of the image in this case.
>
> Vincent

You might try keeping a pixmap copy of your image, and just restoring the
*whole* thing whenever these integer indices change, or quadrants of the whole,
or whatever division is easy and useful. It sounds terribly inefficient, but
depending on the video hardware/software you have, it may not be any worse than
XOR'ing! The reason is that some hardware/software combinations are not able to
write small changes directly to video memory with any efficiency, but instead
buffer and fill large blocks after modification. If you aren't memory limited,
it may work for you. Worth a try anyway. I too used to be a slave to the
perceived efficiencies of XOR, but have since abandoned it after being burned
more than once.

Good Luck,

JD

--
J.D. Smith |*| WORK: (607) 255-5842
Cornell University Dept. of Astronomy |*| (607) 255-6263
304 Space Sciences Bldg. |*| FAX: (607) 255-5875
Ithaca, NY 14853 |*|
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Number of colors of widget appliation
Next Topic: ANNOUNCE: plotconfig

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Nov 29 13:14:11 PST 2025

Total time taken to generate the page: 0.16158 seconds