I needed to rotate polygons but found that polygons do not have an "angle" property like images have.
I wrote a few routines to do the job, they may come in handy.
See
http://www.robertcailliau.eu/Alphabetic ... ation.html
and I'll be happy with constructive comments.
Robert.
Rotating Polygons
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 10055
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Nicely done.
For the future, this prompted me to submit a request to have the angle property honored for all graphics - you can add your vote here:
http://quality.runrev.com/qacenter/show_bug.cgi?id=6816
For the future, this prompted me to submit a request to have the angle property honored for all graphics - you can add your vote here:
http://quality.runrev.com/qacenter/show_bug.cgi?id=6816
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Hi,
I agree, an angle property for polygons would be nice. In the meantime on could come close to the functionality with revRotatePoly.
make an irregular polygon, name it "g1"
create a custom property for this graphic "g1" called myPoints
set myPoints to the points of graphic "g1"
create a slider, set the endvalue of this slider to 359
set the script of the slider to:
on scrollbarDrag newValue
lock screen
set the points of graphic "g1" to the myPoints of graphic "g1"
revRotatePoly the name of graphic "g1", newValue
end scrollbarDrag
well it rotates, not bad...
Robert, thank you for the explanations on your website, it helps my 'mathematically challenged mind' a lot
regards
Bernd
I agree, an angle property for polygons would be nice. In the meantime on could come close to the functionality with revRotatePoly.
make an irregular polygon, name it "g1"
create a custom property for this graphic "g1" called myPoints
set myPoints to the points of graphic "g1"
create a slider, set the endvalue of this slider to 359
set the script of the slider to:
on scrollbarDrag newValue
lock screen
set the points of graphic "g1" to the myPoints of graphic "g1"
revRotatePoly the name of graphic "g1", newValue
end scrollbarDrag
well it rotates, not bad...
Robert, thank you for the explanations on your website, it helps my 'mathematically challenged mind' a lot

regards
Bernd