summaryrefslogtreecommitdiffstats
path: root/static
diff options
context:
space:
mode:
Diffstat (limited to 'static')
-rw-r--r--static/logo/peach.rkt6
1 files changed, 6 insertions, 0 deletions
diff --git a/static/logo/peach.rkt b/static/logo/peach.rkt
index 8d4fa08..506e65e 100644
--- a/static/logo/peach.rkt
+++ b/static/logo/peach.rkt
@@ -6,12 +6,14 @@
(require racket/draw)
(require racket/snip)
+
;; Sets up settings for the drawing context.
(define (setup-dc dc)
(send dc set-smoothing 'aligned)
(send dc set-pen "black" 1 'transparent)
(send dc set-brush "black" 'solid))
+
;; Draws a moon.
(define (moon-drawing size)
(let* ((moon (new dc-path%))
@@ -25,6 +27,7 @@
(send moon arc outer-arc-x outer-arc-y outer-arc-size outer-arc-size 3.54 2.20 #t)
moon))
+
;; Draws the peach logo in a bitmap and returns the bitmap.
(define (draw-logo size)
(let* ((target (make-bitmap size size))
@@ -34,6 +37,7 @@
(send dc draw-path (moon-drawing size))
target))
+
;; Exports the logo into PNG.
(define (png-export logo size)
(send logo save-file (format "peach-~s.png" size) 'png))
@@ -49,8 +53,10 @@
;; Peach logo as a bitmap.
(define peach-logo (draw-logo 500))
+
;; Render logo in racket shell.
(make-object image-snip% peach-logo)
+
;; Export logo to a PNG file.
(png-export peach-logo 500)