Skip to content

Commit

Permalink
add events
Browse files Browse the repository at this point in the history
  • Loading branch information
rasql committed Mar 27, 2020
1 parent 015cacb commit 151eb93
Show file tree
Hide file tree
Showing 33 changed files with 1,017 additions and 58 deletions.
273 changes: 273 additions & 0 deletions docs/19_util/img.eps
@@ -0,0 +1,273 @@
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: Tk Canvas Widget
%%For: Raphael Holzer
%%Title: Window .!canvas
%%CreationDate: Fri Mar 27 09:14:04 2020
%%BoundingBox: -34 108 648 684
%%Pages: 1
%%DocumentData: Clean7Bit
%%Orientation: Portrait
%%EndComments

%%BeginProlog
% This is a standard prolog for Postscript generated by Tk's canvas
% widget.
/CurrentEncoding [
/space/space/space/space/space/space/space/space
/space/space/space/space/space/space/space/space
/space/space/space/space/space/space/space/space
/space/space/space/space/space/space/space/space
/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle
/parenleft/parenright/asterisk/plus/comma/hyphen/period/slash
/zero/one/two/three/four/five/six/seven
/eight/nine/colon/semicolon/less/equal/greater/question
/at/A/B/C/D/E/F/G
/H/I/J/K/L/M/N/O
/P/Q/R/S/T/U/V/W
/X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore
/grave/a/b/c/d/e/f/g
/h/i/j/k/l/m/n/o
/p/q/r/s/t/u/v/w
/x/y/z/braceleft/bar/braceright/asciitilde/space
/space/space/space/space/space/space/space/space
/space/space/space/space/space/space/space/space
/space/space/space/space/space/space/space/space
/space/space/space/space/space/space/space/space
/space/exclamdown/cent/sterling/currency/yen/brokenbar/section
/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered/macron
/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered
/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown
/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla
/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply
/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide
/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis
] def
50 dict begin
/baseline 0 def
/stipimage 0 def
/height 0 def
/justify 0 def
/lineLength 0 def
/spacing 0 def
/stipple 0 def
/strings 0 def
/xoffset 0 def
/yoffset 0 def
/tmpstip null def
/baselineSampler ( TXygqPZ) def
baselineSampler 0 196 put
/cstringshow {{ dup type /stringtype eq { show } { glyphshow } ifelse } forall } bind def
/cstringwidth {0 exch 0 exch { dup type /stringtype eq { stringwidth } { currentfont /Encoding get exch 1 exch put (\001) stringwidth } ifelse exch 3 1 roll add 3 1 roll add exch } forall } bind def
/ISOEncode {dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding CurrentEncoding def currentdict end /Temporary exch definefont } bind def
/StrokeClip {{strokepath} stopped { (This Postscript printer gets limitcheck overflows when) = (stippling dashed lines; lines will be printed solid instead.) = [] 0 setdash strokepath} if clip } bind def
/EvenPixels {dup 0 matrix currentmatrix dtransform dup mul exch dup mul add sqrt dup round dup 1 lt {pop 1} if exch div mul } bind def
/StippleFill {/tmpstip 1 index def 1 EvenPixels dup scale pathbbox 4 2 roll 5 index div dup 0 lt {1 sub} if cvi 5 index mul 4 1 roll 6 index div dup 0 lt {1 sub} if cvi 6 index mul 3 2 roll 6 index exch { 2 index 5 index 3 index { gsave 1 index exch translate 5 index 5 index true matrix tmpstip imagemask grestore } for pop } for pop pop pop pop pop } bind def
/AdjustColor {CL 2 lt { currentgray CL 0 eq { .5 lt {0} {1} ifelse } if setgray } if } bind def
/DrawText {/stipple exch def /justify exch def /yoffset exch def /xoffset exch def /spacing exch def /strings exch def /lineLength 0 def strings { cstringwidth pop dup lineLength gt {/lineLength exch def} {pop} ifelse newpath } forall 0 0 moveto baselineSampler false charpath pathbbox dup /baseline exch def exch pop exch sub /height exch def pop newpath translate rotate lineLength xoffset mul strings length 1 sub spacing mul height add yoffset mul translate justify lineLength mul baseline neg translate strings { dup cstringwidth pop justify neg mul 0 moveto stipple { gsave /char (X) def { dup type /stringtype eq { { char 0 3 -1 roll put currentpoint gsave char true charpath clip StippleText grestore char stringwidth translate moveto } forall } { currentfont /Encoding get exch 1 exch put currentpoint gsave (\001) true charpath clip StippleText grestore (\001) stringwidth translate moveto } ifelse } forall grestore } {cstringshow} ifelse 0 spacing neg translate } forall } bind def
/TkPhotoColor {gsave 32 dict begin /tinteger exch def /transparent 1 string def transparent 0 tinteger put /olddict exch def olddict /DataSource get dup type /filetype ne { olddict /DataSource 3 -1 roll 0 () /SubFileDecode filter put } { pop } ifelse /newdict olddict maxlength dict def olddict newdict copy pop /w newdict /Width get def /crpp newdict /Decode get length 2 idiv def /str w string def /pix w crpp mul string def /substrlen 2 w log 2 log div floor exp cvi def /substrs [ { substrlen string 0 1 substrlen 1 sub { 1 index exch tinteger put } for /substrlen substrlen 2 idiv def substrlen 0 eq {exit} if } loop ] def /h newdict /Height get def 1 w div 1 h div matrix scale olddict /ImageMatrix get exch matrix concatmatrix matrix invertmatrix concat newdict /Height 1 put newdict /DataSource pix put /mat [w 0 0 h 0 0] def newdict /ImageMatrix mat put 0 1 h 1 sub { mat 5 3 -1 roll neg put olddict /DataSource get str readstring pop pop /tail str def /x 0 def olddict /DataSource get pix readstring pop pop { tail transparent search dup /done exch not def {exch pop exch pop} if /w1 exch length def w1 0 ne { newdict /DataSource pix x crpp mul w1 crpp mul getinterval put newdict /Width w1 put mat 4 x neg put /x x w1 add def newdict image /tail tail w1 tail length w1 sub getinterval def } if done {exit} if tail substrs { anchorsearch {pop} if } forall /tail exch def tail length 0 eq {exit} if /x w tail length sub def } loop } for end grestore } bind def
/TkPhotoMono {gsave 32 dict begin /dummyInteger exch def /olddict exch def olddict /DataSource get dup type /filetype ne { olddict /DataSource 3 -1 roll 0 () /SubFileDecode filter put } { pop } ifelse /newdict olddict maxlength dict def olddict newdict copy pop /w newdict /Width get def /pix w 7 add 8 idiv string def /h newdict /Height get def 1 w div 1 h div matrix scale olddict /ImageMatrix get exch matrix concatmatrix matrix invertmatrix concat newdict /Height 1 put newdict /DataSource pix put /mat [w 0 0 h 0 0] def newdict /ImageMatrix mat put 0 1 h 1 sub { mat 5 3 -1 roll neg put 0.000 0.000 0.000 setrgbcolor olddict /DataSource get pix readstring pop pop newdict /DataSource pix put newdict imagemask 1.000 1.000 1.000 setrgbcolor olddict /DataSource get pix readstring pop pop newdict /DataSource pix put newdict imagemask } for end grestore } bind def
%%EndProlog
%%BeginSetup
/CL 2 def
%%EndSetup

%%Page: 1 1
save
306.0 396.0 translate
1 1 scale
5 -287 translate
-345 574 moveto 336 574 lineto 336 0 lineto -345 0 lineto closepath clip newpath
gsave
grestore
gsave
0 283 moveto
100 283 lineto
1 setlinecap
1 setlinejoin
1 setlinewidth
[] 0 setdash
1.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
100 283 moveto
100 283 lineto
1 setlinecap
1 setlinejoin
5 setlinewidth
[] 0 setdash
1.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
100 283 moveto
150 369.602540378444 lineto
1 setlinecap
1 setlinejoin
1 setlinewidth
[] 0 setdash
1.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
150 369.602540378444 moveto
150 369.602540378444 lineto
1 setlinecap
1 setlinejoin
5 setlinewidth
[] 0 setdash
1.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
150 369.602540378444 moveto
100 456.205080756888 lineto
1 setlinecap
1 setlinejoin
1 setlinewidth
[] 0 setdash
1.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
100 456.205080756888 moveto
100 456.205080756888 lineto
1 setlinecap
1 setlinejoin
5 setlinewidth
[] 0 setdash
1.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
100 456.205080756888 moveto
2.8421709430404e-14 456.205080756888 lineto
1 setlinecap
1 setlinejoin
1 setlinewidth
[] 0 setdash
1.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
2.8421709430404e-14 456.205080756888 moveto
2.8421709430404e-14 456.205080756888 lineto
1 setlinecap
1 setlinejoin
5 setlinewidth
[] 0 setdash
1.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
2.8421709430404e-14 456.205080756888 moveto
-50 369.602540378444 lineto
1 setlinecap
1 setlinejoin
1 setlinewidth
[] 0 setdash
1.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
-50 369.602540378444 moveto
-50 369.602540378444 lineto
1 setlinecap
1 setlinejoin
5 setlinewidth
[] 0 setdash
1.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
-50 369.602540378444 moveto
-7.8159700933611e-14 283 lineto
1 setlinecap
1 setlinejoin
1 setlinewidth
[] 0 setdash
1.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
grestore
gsave
-7.8159700933611e-14 283 moveto
-7.8159700933611e-14 283 lineto
1 setlinecap
1 setlinejoin
5 setlinewidth
[] 0 setdash
1.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
grestore
gsave
15.9999999999999 283 moveto
13.9999999999999 285 lineto
9.99999999999992 284 lineto
6.99999999999993 287 lineto
8.99999999999993 290 lineto
7.99999999999993 292 lineto
4.99999999999993 289 lineto
0.999999999999928 290 lineto
-3.00000000000007 288 lineto
-6.00000000000007 291 lineto
-8.00000000000007 289 lineto
-5.00000000000007 287 lineto
-7.00000000000008 283 lineto
-5.00000000000008 279 lineto
-8.00000000000008 277 lineto
-6.00000000000009 275 lineto
-3.00000000000008 278 lineto
0.999999999999916 276 lineto
4.99999999999992 277 lineto
7.99999999999991 274 lineto
8.99999999999991 276 lineto
6.99999999999992 279 lineto
9.99999999999992 282 lineto
13.9999999999999 281 lineto
15.9999999999999 283 lineto
0.000 0.502 0.000 setrgbcolor AdjustColor
eofill
15.9999999999999 283 moveto
13.9999999999999 285 lineto
9.99999999999992 284 lineto
6.99999999999993 287 lineto
8.99999999999993 290 lineto
7.99999999999993 292 lineto
4.99999999999993 289 lineto
0.999999999999928 290 lineto
-3.00000000000007 288 lineto
-6.00000000000007 291 lineto
-8.00000000000007 289 lineto
-5.00000000000007 287 lineto
-7.00000000000008 283 lineto
-5.00000000000008 279 lineto
-8.00000000000008 277 lineto
-6.00000000000009 275 lineto
-3.00000000000008 278 lineto
0.999999999999916 276 lineto
4.99999999999992 277 lineto
7.99999999999991 274 lineto
8.99999999999991 276 lineto
6.99999999999992 279 lineto
9.99999999999992 282 lineto
13.9999999999999 281 lineto
15.9999999999999 283 lineto
1 setlinejoin 1 setlinecap
1 setlinewidth
[] 0 setdash
1.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
restore showpage

%%Trailer
end
%%EOF
Binary file added docs/19_util/img.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/19_util/img.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions docs/19_util/intro.py
@@ -0,0 +1,11 @@
# draw turtle graphics and record it to an animated GIF
import turtle
from PIL import Image

turtle.forward(100)
turtle.left(90)
turtle.forward(100)

turtle.done()


File renamed without changes.

0 comments on commit 151eb93

Please sign in to comment.