X-Git-Url: https://git.distorted.org.uk/~mdw/clg/blobdiff_plain/97445da4ecd0f7dbb66b54e38de791b5da998d03..6b4653285642d4a2c080ed1d0eaf69813a594016:/examples/testcairo.lisp diff --git a/examples/testcairo.lisp b/examples/testcairo.lisp index 0cf9fdb..9768b90 100644 --- a/examples/testcairo.lisp +++ b/examples/testcairo.lisp @@ -124,9 +124,9 @@ (cairo:clip cr) (cairo:new-path cr) - (let ((image (cairo:image-surface-create-from-png - #p"clg:examples;romedalen.png"))) - + (let ((image (make-instance 'cairo:image-surface + :filename #p"clg:examples;romedalen.png"))) + (let ((width (cairo:surface-width image)) (height (cairo:surface-height image))) (cairo:scale cr (/ 1.0 width) (/ 1.0 height))) @@ -278,8 +278,8 @@ (define-snippet image (cr) - (let ((image (cairo:image-surface-create-from-png - #p"clg:examples;romedalen.png"))) + (let ((image (make-instance 'cairo:image-surface + :filename #p"clg:examples;romedalen.png"))) (cairo:translate cr 0.5 0.5) (cairo:rotate cr (deg-to-rad 45.0)) (let ((width (cairo:surface-width image)) @@ -291,8 +291,8 @@ (define-snippet image-pattern (cr) - (let* ((image (cairo:image-surface-create-from-png - #p"clg:examples;romedalen.png")) + (let* ((image (make-instance 'cairo:image-surface + :filename #p"clg:examples;romedalen.png")) (pattern (cairo:pattern-create-for-surface image))) (setf (cairo:pattern-extend pattern) :repeat) (cairo:translate cr 0.5 0.5) @@ -540,7 +540,6 @@ (clg-init) -#?(pkg-config:pkg-exists-p "librsvg-2.0" :atleast-version "2.13.93") (rsvg:init) ;; We need to turn off floating point exceptions, because Cairo is @@ -549,4 +548,4 @@ #+sbcl(sb-int:set-floating-point-modes :traps nil) #+cmu(ext:set-floating-point-modes :traps nil) -(create-tests) +(within-main-loop (create-tests))