         self.contentOffset = CGPointMake(0, self.contentSize.height - self.frame.size.height)
         self.delegate = self
     }
-
-    private func pathForPoint(position:Int, sec:Float) -> UIBezierPath
+    
+    private func pathForPoint(position: Int, sec: Float) -> UIBezierPath
     {
         let radius = BeatmapView.noteRadius
         let center = CGPointMake(getPointX(position), getPointY(sec))
         return pathForCircleCenteredAtPoint(center, withRadius: radius)
     }
-    
-    
-    private func pathForLongPress(position:Int, sec1:Float, sec2:Float) -> UIBezierPath {
+    private func pathForPointSmall(position: Int, sec: Float) -> UIBezierPath
+    {
+        let radius = BeatmapView.noteRadius / 2
+        let center = CGPointMake(getPointX(position), getPointY(sec))
+        return pathForCircleCenteredAtPoint(center, withRadius: radius)
+    }
+    private func pathForSyncLine(note1: CGSSBeatmap.Note, note2: CGSSBeatmap.Note) -> UIBezierPath
+    {
+        let x1 = getPointX(note1.finishPos!)
+        let x2 = getPointX(note2.finishPos!)
+        let y = getPointY(note1.sec!)
+        
+        let path = UIBezierPath()
+        path.moveToPoint(CGPointMake(x1, y))
+        path.addLineToPoint(CGPointMake(x2, y))
+        path.lineWidth = 3
+        return path
+        
+    }
+    
+    private func pathForLongPress(position: Int, sec1: Float, sec2: Float) -> UIBezierPath {
         let x = getPointX(position)
         let y1 = getPointY(sec1)
         let y2 = getPointY(sec2)
-        let path = UIBezierPath.init(rect: CGRectMake(x - BeatmapView.noteRadius, y2, BeatmapView.noteRadius * 2, y1 - y2))
-        return path
-    }
-    
-    private func pathForSlider(note1:CGSSBeatmap.Note, note2:CGSSBeatmap.Note) -> UIBezierPath? {
+        let r = BeatmapView.noteRadius
+        let path = UIBezierPath.init(rect: CGRectMake(x - r, y2, r * 2, y1 - y2))
+        return path
+    }
+    
+    private func pathForSlider(note1: CGSSBeatmap.Note, note2: CGSSBeatmap.Note) -> UIBezierPath? {
         
         let x1 = getPointX(note1.finishPos!)
         let x2 = getPointX(note2.finishPos!)
         let y1 = getPointY(note1.sec!)
         let y2 = getPointY(note2.sec!)
-        //个别情况下滑条的组id会重复使用,为了避免这种情况带来的错误,当滑条的点间距大于1个section时,失效
+        // 个别情况下滑条的组id会重复使用,为了避免这种情况带来的错误,当滑条的点间距大于1个section时,失效
         if y1 - y2 > BeatmapView.sectionHeight {
             return nil
         }
+        
+        let t = atan((y1 - y2) / (x2 - x1))
+        let r = BeatmapView.noteRadius - 2
         let path = UIBezierPath()
-        path.moveToPoint(CGPointMake(x1, y1 - BeatmapView.noteRadius))
-        path.addLineToPoint(CGPointMake(x1, y1 + BeatmapView.noteRadius))
-        path.addLineToPoint(CGPointMake(x2, y2 + BeatmapView.noteRadius))
-        path.addLineToPoint(CGPointMake(x2, y2 - BeatmapView.noteRadius))
-        return path
-    }
-    
-    private func pathForLongPress(position:Int, sec1:Float, y:CGFloat) -> UIBezierPath {
+        path.moveToPoint(CGPointMake(x1 - sin(t) * r, y1 - cos(t) * r))
+        path.addLineToPoint(CGPointMake(x1 + sin(t) * r, y1 + cos(t) * r))
+        path.addLineToPoint(CGPointMake(x2 + sin(t) * r, y2 + cos(t) * r))
+        path.addLineToPoint(CGPointMake(x2 - sin(t) * r, y2 - cos(t) * r))
+        return path
+    }
+    
+    private func pathForLongPress(position: Int, sec1: Float, y: CGFloat) -> UIBezierPath {
         let x = getPointX(position)
         let y1 = getPointY(sec1)
         let path = UIBezierPath.init(rect: CGRectMake(x - BeatmapView.noteRadius, y, BeatmapView.noteRadius * 2, y1 - y))
         return path
     }
     
-    private func pathForSectionLine(positionY:CGFloat) -> UIBezierPath
+    private func pathForSectionLine(positionY: CGFloat) -> UIBezierPath
     {
         let path = UIBezierPath()
         path.moveToPoint(CGPoint(x: 50, y: positionY))

                    path.addLineToPoint(point2)
                    path.addLineToPoint(point3)
                    UIColor.whiteColor().set()
                    //path.stroke()
                    path.fill()
                    //path2.stroke()
                    path2.fill()
                }
            }

        }
        
        //处理未显示完全的长按部分
        for i in 1...5 {
            if positionPressed[i-1] != 0 {
                let path = pathForLongPress(i, sec1: positionPressed[i-1], y: rect.origin.y)
                positionPressed[i-1] = 0
                strokeColor.colorWithAlphaComponent(0.5).set()
                //path.stroke()
                path.fill()
            }
        }
        
        
        
    }
    
    func initWith(beatmap:CGSSBeatmap, bpm:Int, type:Int) {
        self.beatmap = beatmap
        self.notes = beatmap.notes
        self.bpm = bpm

                    path.addLineToPoint(point2)
                    path.addLineToPoint(point3)
                    UIColor.whiteColor().set()
                    // path.stroke()
                    path.fill()
                    // path2.stroke()
                    path2.fill()
                }
                
                // 箭头向右
                if note.status == 2 {
                    let center = CGPointMake(getPointX(note.finishPos!), getPointY(note.sec!))
                    let point1 = CGPointMake(center.x + BeatmapView.noteRadius - 1, center.y)
