| 53 | | //draw line from the last fame's last point to this frame's first |
|---|
| 54 | | if(count > 0) |
|---|
| 55 | | { |
|---|
| 56 | | [curve removeAllPoints]; |
|---|
| 57 | | NSPoint point1 = NSMakePoint(lastPoint.x, lastPoint.y); |
|---|
| 58 | | NSPoint point2 = NSMakePoint(points[0].x, points[0].y); |
|---|
| 59 | | |
|---|
| 60 | | if(lastPoint.r | lastPoint.g | lastPoint.b) //only do curve if color is non-zero |
|---|
| 61 | | { |
|---|
| 62 | | [curve moveToPoint:point1]; |
|---|
| 63 | | [curve lineToPoint:point2]; |
|---|
| 64 | | |
|---|
| 65 | | [curve transformUsingAffineTransform:transform]; |
|---|
| 66 | | |
|---|
| 67 | | NSColor *laserColor = [NSColor colorWithCalibratedRed:(lastPoint.r/255.) green:(lastPoint.g/255.) blue:(lastPoint.b)/255. alpha:1]; |
|---|
| 68 | | |
|---|
| 69 | | [curve setLineWidth:400*scalingFactor]; |
|---|
| 70 | | [[laserColor colorWithAlphaComponent:.5] set]; |
|---|
| 71 | | [curve stroke]; |
|---|
| 72 | | |
|---|
| 73 | | [curve setLineWidth:200*scalingFactor]; |
|---|
| 74 | | [laserColor set]; |
|---|
| 75 | | [curve stroke]; |
|---|
| 76 | | } |
|---|
| 77 | | } |
|---|
| 78 | | |
|---|
| 79 | | for(i; i < count-1; i++) |
|---|
| | 53 | for(i; i < count; i++) |
|---|