Last active
September 18, 2018 13:01
-
-
Save cormullion/fa92a6d4678942db543ada10a6cef5f2 to your computer and use it in GitHub Desktop.
code-for-stack-overflow-ad-2018
This file contains hidden or 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
| using Luxor, Colors | |
| chunk(x, n) = [x[i:min(i+n-1,length(x))] for i in 1:n:length(x)] | |
| function frame() | |
| leftmargin = -230 | |
| @png begin | |
| background("white") | |
| pl = box(O, 600, 600, vertices=true) | |
| # data | |
| @layer begin | |
| rotate(pi/12) | |
| translate(-500, 0) | |
| sethue("gray90") | |
| fontface("Menlo") | |
| fontsize(20) | |
| textbox(chunk(bitstring(rand(Int64)) ^ 130, 100), # bitstring is version 1.0 | |
| O - (0, 300), | |
| leading=50) | |
| end | |
| # technical | |
| @layer begin | |
| setline(0.3) | |
| sethue("grey80") | |
| translate(200, -50) | |
| rotate(pi/4) | |
| for i in 1:100 | |
| setgray(rescale(i, 1, 100, 0.6, 0.9)) | |
| @layer begin | |
| rotate(i/15) | |
| ellipse(O, 16i, 7i, :stroke) | |
| end | |
| end | |
| end | |
| # julia logo | |
| gsave() | |
| translate(Point(leftmargin - 50, -225)) # allow for j descender | |
| scale(1.25, 1.25) | |
| julialogo() | |
| grestore() | |
| # slogans | |
| fontface("Verlag-Black") | |
| sethue("black") | |
| fontsize(31) | |
| # white outline helps readability of text | |
| @layer begin | |
| move(Point(leftmargin, 150)) | |
| setline(3) | |
| setopacity(0.85) | |
| sethue("grey90") | |
| textpath("modern, fast, open source") | |
| strokepath() | |
| end | |
| text("modern, fast, open source", | |
| Point(leftmargin, 150), halign=:left) | |
| fontsize(19.5) | |
| text("for data science and technical computing", | |
| Point(leftmargin, 175), halign=:left) | |
| # github logo | |
| sethue("grey95") | |
| box(O + (0, 250), 600, 100, :fill) | |
| # file GitHub-Mark-32px.png downloaded from | |
| # https://github.com/logos | |
| # githublogo = readpng("GitHub-Mark-Light-32px.png") | |
| githublogo = readpng("GitHub-Mark-32px.png") | |
| sethue("black") | |
| fontsize(22) | |
| text("Contribute on Github", Point(leftmargin, 230), halign=:left) | |
| placeimage(githublogo, Point(-275, 208)) | |
| # don't forget that 2 pixel black border | |
| sethue("black") | |
| setline(4) | |
| box(O, 600, 500, :stroke) | |
| end 600 500 | |
| end | |
| frame() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment