-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
189 additions
and
204 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
set -e | ||
|
||
git checkout gh-pages | ||
git merge main --commit | ||
lein codox | ||
rm -rf docs | ||
mv target/doc docs | ||
git add docs | ||
git commit -m 'Update docs' | ||
git push | ||
git checkout main |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
(ns gdl.draw) | ||
|
||
(defprotocol Drawer | ||
(text [_ {:keys [font text x y h-align up?]}]) | ||
(image [_ image position] | ||
[_ image x y]) | ||
(centered-image [_ image position]) | ||
(rotated-centered-image [_ image rotation position]) | ||
(ellipse [_ position radius-x radius-y color]) | ||
(filled-ellipse [_ position radius-x radius-y color]) | ||
(circle [_ position radius color]) | ||
(filled-circle [_ position radius color]) | ||
(arc [_ center-position radius start-angle degree color]) | ||
(sector [_ center-position radius start-angle degree color]) | ||
(rectangle [_ x y w h color]) | ||
(filled-rectangle [_ x y w h color]) | ||
(line [_ start-position end-position color] | ||
[_ x y ex ey color]) | ||
(with-line-width [_ width draw-fn])) | ||
|
||
(defn grid [drawer leftx bottomy gridw gridh cellw cellh color] | ||
(let [w (* gridw cellw) | ||
h (* gridh cellh) | ||
topy (+ bottomy h) | ||
rightx (+ leftx w)] | ||
(doseq [idx (range (inc gridw)) | ||
:let [linex (+ leftx (* idx cellw))]] | ||
(line drawer linex topy linex bottomy color)) | ||
(doseq [idx (range (inc gridh)) | ||
:let [liney (+ bottomy (* idx cellh))]] | ||
(line drawer leftx liney rightx liney color)))) |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.