Skip to content

Commit

Permalink
Merge branch 'hasCurrentPoint'
Browse files Browse the repository at this point in the history
  • Loading branch information
BradWBeer committed Apr 25, 2016
2 parents 2ec14a0 + 86f19f1 commit fee17c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/package.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@

new-path new-sub-path close-path arc arc-negative curve-to line-to
move-to rectangle rel-move-to rel-curve-to rel-line-to text-path
get-current-point
has-current-point get-current-point

;; text

Expand Down
6 changes: 5 additions & 1 deletion src/path.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@
(rel-move-to dx dy)
(rel-curve-to dx1 dy1 dx2 dy2 dx3 dy3)
(rel-line-to dx dy)
(text-path text))
(text-path text))

(define-flexible (get-current-point pointer)
(with-foreign-objects ((xp :double) (yp :double))
(cairo_get_current_point pointer xp yp)
(values (mem-ref xp :double) (mem-ref yp :double))))

(defun has-current-point (&optional (context *context*))
(with-context-pointer (context pointer)
(= 1 (cairo_has_current_point pointer))))

;; !!! not done yet: glyph-path

;; !!! need to write: path data type iterators, copy-path,
Expand Down

0 comments on commit fee17c9

Please sign in to comment.