diff options
author | siddharth ravikumar <s@ricketyspace.net> | 2022-06-18 23:23:04 -0400 |
---|---|---|
committer | siddharth ravikumar <s@ricketyspace.net> | 2022-06-18 23:23:04 -0400 |
commit | 34e42fb3f22968829c505fc88cf0fd07877a07f8 (patch) | |
tree | c6e3bb20e6578c6c1d66ce78b05b407c60f03214 | |
parent | cb1e0f328647ac8927fc21cd73b9985e69c2cdf5 (diff) |
static: add logo
Generated using racket :)
-rw-r--r-- | static/logo/logo.png | bin | 0 -> 11642 bytes | |||
-rw-r--r-- | static/logo/peach.rkt | 41 |
2 files changed, 41 insertions, 0 deletions
diff --git a/static/logo/logo.png b/static/logo/logo.png Binary files differnew file mode 100644 index 0000000..f47deb6 --- /dev/null +++ b/static/logo/logo.png diff --git a/static/logo/peach.rkt b/static/logo/peach.rkt new file mode 100644 index 0000000..4615ae4 --- /dev/null +++ b/static/logo/peach.rkt @@ -0,0 +1,41 @@ +;;;; Copyright © 2022 siddharth ravikumar <s@ricketyspace.net> +;;;; SPDX-License-Identifier: ISC + +#lang racket + +(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) + (let ((moon (new dc-path%))) + (send moon arc -50 50 320 320 1.57 4.36 #f) + (send moon arc 1 4 490 490 3.54 2.20 #t) + moon)) + +;; Draws the peach logo in a bitmap and returns the bitmap. +(define (draw-logo) + (let* ((target (make-bitmap 500 500)) + (dc (new bitmap-dc% (bitmap target)))) + (setup-dc dc) + (send dc draw-path (moon-drawing)) + target)) + +;; Exports the logo into PNG. +(define (png-export logo) + (send logo save-file "logo.png" 'png)) + +;; Peach logo as a bitmap. +(define peach-logo (draw-logo)) + +;; Render logo in racket shell. +(make-object image-snip% peach-logo) + +;; Export logo to a PNG file. +(png-export peach-logo) |