Advertisement
Guest User

Untitled

a guest
Sep 9th, 2013
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. (defn drawnConnectorWithArrow! [canvasCtx points]
  2. (let [ firstPoint (first points)
  3. restPoints (rest points)
  4. lastTwoPoints [(nth points (- (count points) 2)) lastPoint]]
  5. (.beginPath canvasCtx)
  6. (.moveTo canvasCtx (:x firstPoint) (:y firstPoint)))
  7. (doseq [p restPoints] (.lineTo canvasCtx (:x p) (:y p)))
  8. (drawArrowAtHead canvasCtx lastTwoPoins))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement