I have been able to successfully draw a line using Kinetic JS, as follows:
var track129 = new Kinetic.Spline({
points: [
{x: 3, y: 400},
{x: 196, y: 400},
{x: 213, y: 395},
{x: 290, y: 345},
{x: 319, y: 324},
{x: 389, y: 253},
{x: 457, y: 184},
{x: 471, y: 173},
{x: 481, y: 173},
{x: 682, y: 173}, // this is where the blue track branches to the red track (129, 009).
{x: 708, y: 171},
{x: 740, y: 186},
{x: 773, y: 218},
{x: 799, y: 240},
{x: 822, y: 251},
{x: 845, y: 254},
{x: 866, y: 251},
{x: 894, y: 238},
{x: 934, y: 204}
],
stroke: 'blue',
strokeWidth: 2,
lineCap: 'round',
tension: .2
});
layer.add(track129);
I then rotate the line using the following command:
track129.setRotationDeg(45);
The visual display updates. I then attempt to get the transformed points out of the rotated line like so:
var mySpleenPoints = track129.getPoints();
I end up getting the same array of points back as I entered. I've tried to get the offset and translation in an effort to see if I can derive the absolute
coordinates of the rotated points but I've had no luck. Can anyone help me extract the actual translated values?