     
     public var boundary : Rect {
         var bound: Rect? = nil
-        self.apply { segment, state in
-            switch segment {
+        self.apply { commands, state in
+            switch commands {
             case let line as SDPath.Line:
                 if bound == nil {
                     bound = line.bound(state.last)

            return self
        }
        var _path = SDPath()
        self.apply { segment, state in
            switch segment {
            case let move as SDPath.Move:
                
                _path.append(SDPath.Move(transform * move.point))
                
            case let line as SDPath.Line:
                
                _path.append(SDPath.Line(transform * line.point))
                
            case let quad as SDPath.QuadBezier:
                
                _path.append(SDPath.QuadBezier(transform * quad.p1, transform * quad.p2))
                
            case let cubic as SDPath.CubicBezier:
                
                _path.append(SDPath.CubicBezier(transform * cubic.p1, transform * cubic.p2, transform * cubic.p3))
                
            case let close as SDPath.ClosePath:
                
                _path.append(close)
                
            default: break
            }
        }

    
    public typealias Generator = IndexingGenerator<SDPath>
    
    private var commands: [SDPathCommand]
    
    public var transform : SDTransform
    
    public init() {
        self.commands = []
        self.transform = SDTransform(SDTransform.Identity())
    }
    
    public init(arrayLiteral elements: SDPathCommand ...) {
        self.commands = elements
        self.transform = SDTransform(SDTransform.Identity())
    }
    
    public init<S : SequenceType where S.Generator.Element == SDPathCommand>(_ commands: S) {
        self.commands = commands.array
        self.transform = SDTransform(SDTransform.Identity())
    }
    
    public var center : Point {
