Created
May 12, 2020 22:57
-
-
Save death/73f001b54d23c7ba83f03c9ade7159ae to your computer and use it in GitHub Desktop.
sketch patches
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From d1458bce55856e7eafe60d3428af6ec09ca25f41 Mon Sep 17 00:00:00 2001 | |
From: death <death@adeht.org> | |
Date: Mon, 20 Aug 2018 23:52:19 +0300 | |
Subject: [PATCH 1/2] make defsketch respect supplied initargs | |
--- | |
src/sketch.lisp | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
diff --git a/src/sketch.lisp b/src/sketch.lisp | |
index 3650f29..cef5c6a 100644 | |
--- a/src/sketch.lisp | |
+++ b/src/sketch.lisp | |
@@ -253,7 +253,7 @@ used for drawing, 60fps.") | |
(defun make-custom-slots-setf (sketch bindings) | |
`(setf ,@(mapcan (lambda (binding) | |
- `((slot-value instance ',(car binding)) ,(cadr binding))) | |
+ `((slot-value instance ',(car binding)) ,(car binding))) | |
bindings))) | |
(defun make-reinitialize-setf () | |
-- | |
2.26.2 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 1d9a6cf93a038360528a3ee11b63417f301cfb6f Mon Sep 17 00:00:00 2001 | |
From: death <death@adeht.org> | |
Date: Thu, 23 Apr 2020 14:48:12 +0300 | |
Subject: [PATCH 2/2] test for the right object being non-null | |
--- | |
src/font.lisp | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
diff --git a/src/font.lisp b/src/font.lisp | |
index 971c08a..abfcd88 100644 | |
--- a/src/font.lisp | |
+++ b/src/font.lisp | |
@@ -68,7 +68,7 @@ | |
(let* ((font (env-font *env*)) | |
(typeface (and font (load-resource (typeface-filename (font-face font)) | |
:size (font-size font))))) | |
- (when (and font (> (length text-string) 0)) | |
+ (when (and typeface (> (length text-string) 0)) | |
(with-pen (make-pen :stroke nil) | |
(let* ((top 0) | |
(lines (split-sequence:split-sequence #\newline text-string)) | |
-- | |
2.26.2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment