Selected object "boxes"

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Selected object "boxes"

JosepM
Hi List,

I don't know how to refer to this boxes, maybe the anchor points to resize the object.
I need make invisible the boxes that appear when draw a polygon or circle, the dark grey boxes around the graphic. I need to draw a polygon but without show these anchor boxes, so they difficult the draw.

It's posible?

Salut,
Josep
Reply | Threaded
Open this post in threaded view
|

Re: Selected object "boxes"

dunbarxx
I wrote a live resizing gadget a while back. Works under script control,
not the IDE tools. Likely someone will post a full application in the next few
minutes, but if not, I will send mine tomorrow when I get to my office.

Craig Newman
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Selected object "boxes"

J. Landman Gay
In reply to this post by JosepM
JosepM wrote:
> Hi List,
>
> I don't know how to refer to this boxes, maybe the anchor points to resize
> the object.

We call them "handles".

> I need make invisible the boxes that appear when draw a polygon or circle,
> the dark grey boxes around the graphic. I need to draw a polygon but without
> show these anchor boxes, so they difficult the draw.
>
> It's posible?

The engine puts handles on the graphic whenever it is selected in edit
mode. Your script can create a graphic without using edit mode and there
will be no handles:

   create graphic "newGrc"

If you need to resize the graphic, you'd have to figure out the
rectangle and then set it by script:

   set the rect of grc "newGrc" to a,b,x,y

As long as you are not in edit mode there will be no handles.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Selected object "boxes"

JosepM
Hi,

But I need that the user create the poly on the fly, making a "layer", so with create graphic this is fixed, isn't?

El 07/05/2010, a las 5:40, J. Landman Gay [via Runtime Revolution] escribió:

JosepM wrote:
> Hi List,
>
> I don't know how to refer to this boxes, maybe the anchor points to resize
> the object.

We call them "handles".

> I need make invisible the boxes that appear when draw a polygon or circle,
> the dark grey boxes around the graphic. I need to draw a polygon but without
> show these anchor boxes, so they difficult the draw.
>
> It's posible?

The engine puts handles on the graphic whenever it is selected in edit
mode. Your script can create a graphic without using edit mode and there
will be no handles:

   create graphic "newGrc"

If you need to resize the graphic, you'd have to figure out the
rectangle and then set it by script:

   set the rect of grc "newGrc" to a,b,x,y

As long as you are not in edit mode there will be no handles.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution





Reply | Threaded
Open this post in threaded view
|

Re: Selected object "boxes"

JosepM
In reply to this post by dunbarxx
OK. Thanks.

El 07/05/2010, a las 5:35, dunbarx [via Runtime Revolution] escribió:

I wrote a live resizing gadget a while back. Works under script control,
not the IDE tools. Likely someone will post a full application in the next few
minutes, but if not, I will send mine tomorrow when I get to my office.

Craig Newman
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution





Reply | Threaded
Open this post in threaded view
|

Re: Selected object "boxes"

JosepM
In reply to this post by J. Landman Gay
Or maybe reduze the size of the handles (found the word :) changing some pattern...?

Salut,
Josep

El 07/05/2010, a las 5:40, J. Landman Gay [via Runtime Revolution] escribió:

JosepM wrote:
> Hi List,
>
> I don't know how to refer to this boxes, maybe the anchor points to resize
> the object.

We call them "handles".

> I need make invisible the boxes that appear when draw a polygon or circle,
> the dark grey boxes around the graphic. I need to draw a polygon but without
> show these anchor boxes, so they difficult the draw.
>
> It's posible?

The engine puts handles on the graphic whenever it is selected in edit
mode. Your script can create a graphic without using edit mode and there
will be no handles:

   create graphic "newGrc"

If you need to resize the graphic, you'd have to figure out the
rectangle and then set it by script:

   set the rect of grc "newGrc" to a,b,x,y

As long as you are not in edit mode there will be no handles.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution





Reply | Threaded
Open this post in threaded view
|

Re: Selected object "boxes"

BNig
In reply to this post by JosepM
Josep,
look at RevOnline, I did a stack "create polygon graphic" that shows how a user can draw a polygon graphic without the "handles" etc. It has a couple more options, some of them not too well implemented, but you could use it as a start. And Craig might send you his stack, so you have something to chew on.
regards
Bernd
Reply | Threaded
Open this post in threaded view
|

Re: Selected object "boxes"

dunbarxx
In reply to this post by JosepM
These two handlers can be put into the script of any object. It is no big
deal; very straighforward. The commented lines refer to a small btn called
"handle" which I originally had to indicate exactly what you don't want to
see. The handler can certainly be modified and put in the card script to work
on any object. I originally made this to test which messages seemed to be
best suited for the task, like "mouseWithin", "mouseMove" and "mouseStillDown".
This is the "mouseDown" version.

watch line breaks...


on mouseDown
    repeat while the mouse is down
       --show btn "handle"
       put the rect of me into tRect
       put whichCorner(the mouseloc,tRect) into tCorner
       switch
          case tcorner = "TR"
             set the rect of me to   item 1 of tRect & "," & item 2 of the
mouseLoc & "," & item 1 of the mouseLoc & "," & item 4 of tRect
             --set the loc of   btn "handle" to item 3 of the rect of me &
"," & item 2 of the rect of me
             break
          case tcorner = "TL"
             set the rect of me to   item 1 of the mouseLoc   & "," & item
2 of the mouseLoc & "," & item 3 of tRect & "," & item 4 of tRect
             --set the loc of   btn "handle" to item 1 of the rect of me &
"," & item 2 of the rect of me
             break
          case tcorner = "BL"
             set the rect of me to   item 1 of the the mouseLoc   & "," &
item 2 of   tRect & "," & item 3 of   tRect & "," & item 2 of the mouseLoc
             --set the loc of   btn "handle" to item 1 of the rect of me &
"," & item 4 of the rect of me
             break
          case tcorner = "BR"
             set the rect of me to   item 1 of   tRect   & "," & item 2 of
tRect & "," & item 1 of the mouseLoc & "," & item 2 of the mouseLoc
             --set the loc of   btn "handle" to item 3 of the rect of me &
"," & item 4 of the rect of me
             break
       end Switch
    end repeat
    hide btn "handle"
end mouseDown

function whichCorner mLoc,tRect
    switch
       case abs(item 2 of mLoc - item 2 of tRect) < 15 and abs(item 1 of
mLoc - item 3 of tRect) < 15
          return TR
          break
       case abs(item 1 of mLoc - item 1 of tRect) < 15 and abs(item 2 of
mLoc - item 2 of tRect) < 15
          return TL
          break
       case abs(item 1 of mLoc - item 1 of tRect) < 15 and abs(item 2 of
mLoc - item 4 of tRect) < 15
          return BL
          break
       case abs(item 1 of mLoc - item 3 of tRect) < 15 and abs(item 2 of
mLoc - item 4 of tRect) < 15
          return BR
          break
    end switch
end whichCorner
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Selected object "boxes"

JosepM
Thanks, later I will try and post the results... :)

Salut,
Josep

El 07/05/2010, a las 15:47, dunbarx [via Runtime Revolution] escribió:

These two handlers can be put into the script of any object. It is no big
deal; very straighforward. The commented lines refer to a small btn called
"handle" which I originally had to indicate exactly what you don't want to
see. The handler can certainly be modified and put in the card script to work
on any object. I originally made this to test which messages seemed to be
best suited for the task, like "mouseWithin", "mouseMove" and "mouseStillDown".
This is the "mouseDown" version.

watch line breaks...


on mouseDown
    repeat while the mouse is down
       --show btn "handle"
       put the rect of me into tRect
       put whichCorner(the mouseloc,tRect) into tCorner
       switch
          case tcorner = "TR"
             set the rect of me to   item 1 of tRect & "," & item 2 of the
mouseLoc & "," & item 1 of the mouseLoc & "," & item 4 of tRect
             --set the loc of   btn "handle" to item 3 of the rect of me &
"," & item 2 of the rect of me
             break
          case tcorner = "TL"
             set the rect of me to   item 1 of the mouseLoc   & "," & item
2 of the mouseLoc & "," & item 3 of tRect & "," & item 4 of tRect
             --set the loc of   btn "handle" to item 1 of the rect of me &
"," & item 2 of the rect of me
             break
          case tcorner = "BL"
             set the rect of me to   item 1 of the the mouseLoc   & "," &
item 2 of   tRect & "," & item 3 of   tRect & "," & item 2 of the mouseLoc
             --set the loc of   btn "handle" to item 1 of the rect of me &
"," & item 4 of the rect of me
             break
          case tcorner = "BR"
             set the rect of me to   item 1 of   tRect   & "," & item 2 of
tRect & "," & item 1 of the mouseLoc & "," & item 2 of the mouseLoc
             --set the loc of   btn "handle" to item 3 of the rect of me &
"," & item 4 of the rect of me
             break
       end Switch
    end repeat
    hide btn "handle"
end mouseDown

function whichCorner mLoc,tRect
    switch
       case abs(item 2 of mLoc - item 2 of tRect) < 15 and abs(item 1 of
mLoc - item 3 of tRect) < 15
          return TR
          break
       case abs(item 1 of mLoc - item 1 of tRect) < 15 and abs(item 2 of
mLoc - item 2 of tRect) < 15
          return TL
          break
       case abs(item 1 of mLoc - item 1 of tRect) < 15 and abs(item 2 of
mLoc - item 4 of tRect) < 15
          return BL
          break
       case abs(item 1 of mLoc - item 3 of tRect) < 15 and abs(item 2 of
mLoc - item 4 of tRect) < 15
          return BR
          break
    end switch
end whichCorner
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution





Reply | Threaded
Open this post in threaded view
|

Re: Selected object "boxes"

Alejandro Tejada
In reply to this post by JosepM
Hi Josep,

Look at this Revlet from your browser,
but first, read the instructions included
in the card:
http://www.capellan2000.000space.com/test02.html

Download this stack to explore the source code:
http://andregarzia.on-rev.com/alejandro/stacks/newPentoolScript_v02.zip

Visit this page to download other stacks
and "pieces of code" related to vector
graphics in this platform:
http://andregarzia.on-rev.com/alejandro/
http://webspace.webring.com/people/qc/capellan/
http://www.capellan2000.000space.com/

Have a nice weekend!

Alejandro