Re: TVLCT as mouse is moved? [message #35208] |
Thu, 15 May 2003 10:24 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Craig Hamilton (someone@microsoft.com) writes:
> There's always something wrong with my code - that's a given....
Your's too, huh? :-)
> 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.
I forgot to mention that you could look at a program like
WINDOWIMAGE for inspiration. The contrast changes as
you drag in that window, but that is similar enough to
changing the colors, I guess.
http://www.dfanning.com/programs/windowimage.pro
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
|
|
|
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
|
|
|
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
|
|
|