| Re: TVLCT as mouse is moved? [message #35211 is a reply to message #35209] |
Thu, 15 May 2003 09:14  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
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
|
|
|
|