border around draw widget [message #50381] |
Wed, 27 September 2006 06:42  |
Laurens
Messages: 41 Registered: May 2006
|
Member |
|
|
Hi,
I have a couple of draw widgets displaying various gamma-scans. Now the
user has to select two of them by clicking on them; done.
But now I want to let the user know where he clicked, so is it possible
to draw some sort of red border of a few pix around the clicked
draw-widget? I know they have a frame property, but that's just too thin
and doesn't attract attention...
Thnx in advance,
Laurens
|
|
|
Re: border around draw widget [message #50530 is a reply to message #50381] |
Wed, 04 October 2006 08:06   |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
Laurens wrote:
> I use a class-object to store values like which one is selected. For
> what I understand, the
> OPLOT, [0,0,1,1,0], [0,1,1,0,0], COLOR=255, THICK=4
> line draws a rectangle around the object, but how do you remove it when
> its deselected? the "TV, thisData.image" command only draws the actual
> image, it seems.
Drawing the image will overwrite the line (if the image and draw window
are the same size).
Mike
--
www.michaelgalloy.com
|
|
|
Re: border around draw widget [message #50572 is a reply to message #50381] |
Mon, 09 October 2006 15:32  |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
JD Smith wrote:
> On Thu, 28 Sep 2006 10:17:24 -0700, Rick Towler wrote:
>
>> I think we have strayed way off on this one... While JD's suggestion is
>> clever, from a usability perspective I don't think it is as effective as
>> a colored border or a color shift of the image. And adding a border is
>> trivial.
>
> Yes, trivial, unless you need all pixels for drawing. Yes, you could just
> draw over the top of the image, assuming the loss of a few pixels around
> the edge is irrelevant. Otherwise, the base-on-base trick might be worth
> it, to keep your drawing code simple (...I have a canvas which is 248x248
> pixels if selected, or 256x256 otherwise...).
I was purposefully keeping it as simple as possible, but that's a good
point. If I were doing this I would either add a semi-transparent
border (via compositing, not using oplot) or shift the color. And if I
really needed every pixel to be displayed unadulterated, I would just
add a black border around the image and draw the border there. All
options that *I* think are relatively simple.
I like the using color to provide additional feedback but one can apply
the technique that best suits the requirements.
-Rick
|
|
|