tpapp / cl-cairo2

Cairo bindings for Common Lisp

This URL has Read+Write access

cl-cairo2 / my-double.lisp
100644 12 lines (9 sloc) 0.413 kb
1
2
3
4
5
6
7
8
9
10
11
12
(in-package :cl-cairo2)
 
;; define our own alias for double float, so we can automatically
;; convert other numerical types in the arguments
(define-foreign-type my-double-type ()
  ()
  (:actual-type :double)
  (:simple-parser my-double))
                                                                              
(defmethod translate-to-foreign (value (type my-double-type))
  (coerce value 'double-float))