How do you set the angle of a line graphic?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10341
Joined: Wed May 06, 2009 2:28 pm

Re: How do you set the angle of a line graphic?

Post by dunbarx » Mon Nov 23, 2020 8:28 pm

All I can say for sure, based on my test before posting, is that the IDE provides a means of adjusting the angle of both line and polygon objects by arbitrary degrees
That was my original query. I do not think, for lines, LC does such a thing at all.

See posts 2 and 3 from the top above. Both Stam and EdocEvil point out the inherent silliness of my original question, at least the way I phrased it. I expanded (backpedaled?) on that right away, and played around until I got a method to do what I actually wanted, not what I actually asked.

In other words, you cannot set the angle of a line directly; there is no property with which to do so. But you can draw a new one (or change an existing one) to your exact specifications.

Craig

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10055
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: How do you set the angle of a line graphic?

Post by FourthWorld » Mon Nov 23, 2020 9:34 pm

dunbarx wrote:
Mon Nov 23, 2020 8:28 pm
All I can say for sure, based on my test before posting, is that the IDE provides a means of adjusting the angle of both line and polygon objects by arbitrary degrees
That was my original query. I do not think, for lines, LC does such a thing at all.
Yeah, I thought so too, until I tried it.

See Objects -> Rotate Polygon
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10341
Joined: Wed May 06, 2009 2:28 pm

Re: How do you set the angle of a line graphic?

Post by dunbarx » Mon Nov 23, 2020 11:33 pm

Richard.
See Objects -> Rotate Polygon
I know about the very primitive tools available to change an existing graphic, whatever style it is. This is still a far cry from being able to draw (or change) a line, starting from any point, at any length and at any angle.

Nothing I have seen so far, apart from the handler I posted, does anything even remotely, even slightly close. LC is not designed to to that. I get it, and do not blame it. It is unfair even to ask it. But I wanted to do that, so I did.

Craig

Post Reply