Need clean image
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 4009
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Need clean image
Craig,
you could move an open polygon with a bit of cheating. It involves an image at 99% transparency that gets the mouse events and passes them to an enclosing group. Script is in the group.
Kind regards
Bernd
PS I immensely enjoyed your flash-talk at the 2022 developer conference. Wow.
you could move an open polygon with a bit of cheating. It involves an image at 99% transparency that gets the mouse events and passes them to an enclosing group. Script is in the group.
Kind regards
Bernd
PS I immensely enjoyed your flash-talk at the 2022 developer conference. Wow.
-
- Livecode Opensource Backer
- Posts: 9411
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Need clean image
You could, of course, do what I did with 3 graphics in a group, and a script in the group.
-
- VIP Livecode Opensource Backer
- Posts: 4009
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Need clean image
No I could not. One of many reasons would be that it is hard to grab (relatively small width)richmond62 wrote: ↑Wed May 18, 2022 10:04 amYou could, of course, do what I did with 3 graphics in a group, and a script in the group.
If I would do that though I would change the code e.g. for image "RV" to
Code: Select all
local sRunning, sXDiff, sYLoc
on mouseDown
put the clickLoc into tClick
put the loc of me into tLoc
put item 1 of tClick - item 1 of tLoc into sXDiff
put item 2 of tLoc into sYLoc
put true into sRunning
end mouseDown
on mouseMove x,y
if not sRunning then exit mouseMove
lock screen
put x - sXDiff into tNewX
set the loc of me to tNewX, sYLoc
put the right of me into RITE
put the left of img "LV" into LLL
put (RITE - LLL) into LENF
set the width of img "HOR" to LENF
set the left of img "HOR" to LLL
unlock screen
end mouseMove
on mouseUp
lock screen
put false into sRunning
end mouseUp
Kind regards
Bernd
-
- Livecode Opensource Backer
- Posts: 9411
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Need clean image
Of course you COULD, but you WILL NOT.No I could not.
A group would NOT have a small width to grab,
-
- VIP Livecode Opensource Backer
- Posts: 9678
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Need clean image
Lots of hubbub.
I use this in the card script to dynamically adjust the width/height of these thin "brackets", which are used to annotate the locations and extents of various circuits in a drawing. For the horizontal versions:
Works fine. The actual handlers only work if the target has certain custom properties set. The user can "grab" these objects, place them as required, then adjust their dimensions by eye.
That was never the problem. I rarely use images or graphics, but I am getting by fairly well with the new graphic gadgets tweaked by Mark W. The issue I had with images is that the line widths varied as the dimensions did. Polygons are constant.
Craig
I use this in the card script to dynamically adjust the width/height of these thin "brackets", which are used to annotate the locations and extents of various circuits in a drawing. For the horizontal versions:
Code: Select all
on mouseStillDown
if the controlKey is down then set the width of the target to the width of the target + 3
else if the commandKey is down then set the width of the target to the width of the target - 3
end mouseStillDown
on mouseMove
if the mouse is down then set the loc of me to the mouseLoc
end mouseMove
That was never the problem. I rarely use images or graphics, but I am getting by fairly well with the new graphic gadgets tweaked by Mark W. The issue I had with images is that the line widths varied as the dimensions did. Polygons are constant.
Craig
-
- Livecode Opensource Backer
- Posts: 9411
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Need clean image
Healthy Hubbub can be an education in itself.Lots of hubbub.
-
- VIP Livecode Opensource Backer
- Posts: 9678
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Need clean image
Richard.
Yes, fall apart.
In development at least, the polygons are a bit fragile, in that after playing with them I have inadvertently done things that close that last side. I am putting in defenses against that happening. It is possible that once these things are built and only users, er, use them, and my meddling stops, they will likely be stable.
Craig
Yes, fall apart.
In development at least, the polygons are a bit fragile, in that after playing with them I have inadvertently done things that close that last side. I am putting in defenses against that happening. It is possible that once these things are built and only users, er, use them, and my meddling stops, they will likely be stable.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9678
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Need clean image
Bernd.
Thanks for the compliment.
Craig
Thanks for the compliment.
I have played with such "compound" controls but am going to try my best to make simple polygon graphics do the job. They seem to hold their line widths better when stretched or compressed.you could move an open polygon with a bit of cheating. It involves an image at 99% transparency that gets the mouse events and passes them to an enclosing group. Script is in the group.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9678
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Need clean image
@LCMark.
Changing a polygon to a curve and setting its opaque works just fine. I do not need to revert back to a polygon. The shape stays stable when its dimensions are changed.
Craig
Changing a polygon to a curve and setting its opaque works just fine. I do not need to revert back to a polygon. The shape stays stable when its dimensions are changed.
Craig