Skip to content

Commit

Permalink
Adds width to segment
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Angel Quinones Garcia committed Aug 9, 2015
1 parent 02042cd commit 13996d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion FreehandDrawing-iOS/FreehandDrawController.swift
Expand Up @@ -72,7 +72,7 @@ class FreehandDrawController : NSObject {
}

private func continueAtPoint(point: CGPoint) {
let segment = Segment(a: self.lastPoint, b: point)
let segment = Segment(a: self.lastPoint, b: point, width: self.width)

let lineCommand = LineDrawCommand(current: segment, previous: lastSegment, width: self.width, color: self.color)

Expand Down
1 change: 1 addition & 0 deletions FreehandDrawing-iOS/Segment.swift
Expand Up @@ -27,6 +27,7 @@ import UIKit
struct Segment {
let a: CGPoint
let b: CGPoint
let width: CGFloat

var midPoint: CGPoint {
return CGPoint(x: (a.x + b.x) / 2, y: (a.y + b.y) / 2)
Expand Down

0 comments on commit 13996d4

Please sign in to comment.