Can anyone think of an easy way to take an existing script, and change it such that the items that are being drawn are oriented horizontally rather than vertically? For example, I am currently drawing a price chart that, as new data is retrieved, draws price bars from the bottom of the screen to the top. I would like to write an option that rotates that function to draw from LEFT to RIGHT. I do not need to re-calculate existing plot points (which would not be difficult), but do need to start drawing the points based on new data, from LEFT to RIGHT. I could just rewrite the script and change the way the points are plotted, but I have many other data that is also being plotted, as well as images that are being moved to certain coordinates. What I am looking for, is an easy way to 'flip' liveCode's reference of width and height (x,y) --> (y,x).
I guess I could write a script to edit existing scripts and look for any (something,something) which would be a coordinate, and flip them...
Is there an easier way?
thanks,
greg
flipping orientation
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 349
- Joined: Tue Oct 28, 2008 1:23 am
- Contact:
Re: flipping orientation
Hi Greg,
The only sensible way to do this is by switching the x and y values in your data. This should be fairly easy.
Kind regards,
Mark
The only sensible way to do this is by switching the x and y values in your data. This should be fairly easy.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode