Page 1 of 2
The Incredible SuperCard Shrink Tool
Posted: Sun Nov 21, 2021 11:06 pm
by RogGuay
I have at times, lamented that I miss the old incredible SuperCard Shrink Tool that gave one the ability to shrink a polygon tightly around any assembly of other objects. I made extensive use of that tool back in the day, and have seen many instances in this forum and the List where this would have been THE solution.
The attached stack is my latest attempt to recreate that tool, but as you can see, it just doesn't cut it! Although the code here is straightforward, it doesn't seem to behave well, You can witness this yourself by simply commenting out the "lock Screen" script.
I am befuddled! If SuperCard can do this, why can't LC? And, what's wrong with my code????
Roger
Re: The Incredible SuperCard Shrink Tool
Posted: Mon Nov 22, 2021 4:27 am
by dunbarx
Roger.
I am not understanding how to even start. If I just click on the button, nothing (after a moment) particularly happens. And when you say "commenting out the "lock Screen" script." I do not know what you mean.
Craig
Re: The Incredible SuperCard Shrink Tool
Posted: Mon Nov 22, 2021 7:21 am
by RogGuay
Very strange. You should see a blue shape (poly) looking vaguely like Rect1 and Rect2 combined after a few seconds. Then if you look at the mouseUp script of the button, you can comment out the Lock Screen in line 6. This will allow you to see how the script is generating this blue poly. I hope that helps and I'm sorry for confusing you.
Roger
Re: The Incredible SuperCard Shrink Tool
Posted: Mon Nov 22, 2021 9:24 am
by richmond62

- Screen shot 2021-11-22 at 10.24.37 AM.png (35.22 KiB) Viewed 6591 times
-
Interestingly enough SuperCard does NOT seem to allow
you to set the size of the corner curve on rounded
rectangles:
-
-
Though this is an interesting approach:
-
-
BUT, I cannot find the Shrink Tool . . .

Re: The Incredible SuperCard Shrink Tool
Posted: Mon Nov 22, 2021 9:43 am
by FourthWorld
Was the Shrink tool only in SuperEdit?
Re: The Incredible SuperCard Shrink Tool
Posted: Mon Nov 22, 2021 9:49 am
by richmond62
-
Still not sure.

Re: The Incredible SuperCard Shrink Tool
Posted: Mon Nov 22, 2021 10:58 am
by richmond62
-
I wonder how to make those 2 SLIDERS permanently visible?
Re: The Incredible SuperCard Shrink Tool
Posted: Mon Nov 22, 2021 6:34 pm
by dunbarx
Ah, I see now. I moved the two shapes around and then clicked the button. I thought the circle was going to shrink around those shapes.
And yes, if the two shapes get too far apart, it breaks down.
Craig
Re: The Incredible SuperCard Shrink Tool
Posted: Mon Nov 22, 2021 6:38 pm
by dunbarx
Rereading, I see that the point was to have a polygon shrink around a few shapes. But how would this be managed? If any irregular polygon was the object to be shrunk, then choices would have to be made about how to keep as much as possible to the original angles and ratios of the starting shape.
This might be better than to continue working...
Craig
Re: The Incredible SuperCard Shrink Tool
Posted: Mon Nov 22, 2021 6:53 pm
by dunbarx
This seems straightforward, if not trivial. If one has an irregular polygon and a control, all you have to do is (pseudo":
Code: Select all
set the loc of the control to the loc of the polygon
break the sides of the polygon into separate lines using the points of that polygon
find the angle that is 90° to each line that "points" inward toward the control
move each line along that angle until intersects the control
trim the inevitable overlaps of the several lines
create a new polygon with the points of all the lines
lose the lines
Will take a stab...
Craig
Re: The Incredible SuperCard Shrink Tool
Posted: Mon Nov 22, 2021 7:11 pm
by richmond62
Stab, stab!
But, why couldn't I find the Shrink Tool in SuperCard?
Re: The Incredible SuperCard Shrink Tool
Posted: Mon Nov 22, 2021 7:41 pm
by FourthWorld
richmond62 wrote: ↑Mon Nov 22, 2021 7:11 pm
...why couldn't I find the Shrink Tool in SuperCard?
If memory serves, it wasn't a language feature, but a layout convenience added into SC's SuperEdit from SuperPaint:
viewtopic.php?f=9&t=36472&start=30#p210767
Re: The Incredible SuperCard Shrink Tool
Posted: Mon Nov 22, 2021 8:44 pm
by bn
If I understand correctly what the shrink tool did, namely to take a bunch or a single graphic and return the outer contour as a polygone graphic then I have here a stack that can do this.
It does it by taking a snapshot of a group containing graphic and tracing the image for the contour of the resultant composite outline.
I repurposed an old tool of mine for this.
Kind regards
Bernd
Re: The Incredible SuperCard Shrink Tool
Posted: Mon Nov 22, 2021 9:17 pm
by stam
That's amazing Bernd!
Re: The Incredible SuperCard Shrink Tool
Posted: Tue Nov 23, 2021 7:22 am
by RogGuay
Bernd, you astound me again with your genius. I only had a quick look at how your tracing is done, but that, of course is the trick! I have my work cut out to understand it.
Thanks,
Roger