Re: TVLCT as mouse is moved? [message #35209 is a reply to message #35208] |
Thu, 15 May 2003 10:13   |
Craig Hamilton
Messages: 28 Registered: December 1996
|
Junior Member |
|
|
There's always something wrong with my code - that's a given....
But, for legacy reasons, I am running with 8-bit color depth.
I don't know if that matters, but you have given me a couple
ideas to explore. I'll dig into and see what I can find.
thanks,
Craig
"David Fanning" <david@dfanning.com> wrote in message
news:MPG.192d6ab8cfc9bd989b98@news.frii.com...
> Craig Hamilton (someone@microsoft.com) writes:
>
>> On a WinXP machine, I would like to adjust the colortable as
>> I drag the mouse across an image in a draw widget. As it works now, it
only
>> updates when I release the mouse button. I know that
>> sliders are documented as having this behavior (not updating
>> until released), but dragging the mouse across the image clearly
>> updates since I use it to draw lines on the images.
>
> Something's wrong with your code. :-)
>
> I'm assuming since you have the latest OS you also
> have a 24-bit graphics card. So as you drag and update
> the color table, you will also have to be re-displaying
> your image. I'm going to guess that your motion event
> handler is simply doing a Device Copy to erase what was
> in the window previously. This is not going to help you
> at all in updating the colors.
>
> On motion events, I would load the new colors then
> re-draw the image into the pixmap window, then
> Device Copy to the display window. It will still be
> a bit slow, but the annoying flicker will be gone,
> I think. :-)
>
> Cheers,
>
> David
> --
> David W. Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Phone: 970-221-0438, E-mail: david@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|