mahjong-render 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +12 -0
  3. data/CONTRIBUTING.md +7 -0
  4. data/LICENSE +202 -0
  5. data/LICENSES/CC0-1.0.txt +121 -0
  6. data/README.ja.md +90 -0
  7. data/README.md +112 -0
  8. data/SECURITY.md +5 -0
  9. data/THIRD_PARTY_NOTICES.md +17 -0
  10. data/assets/manifest.json +45 -0
  11. data/assets/tiles/Chun.svg +232 -0
  12. data/assets/tiles/Front.svg +334 -0
  13. data/assets/tiles/Haku.svg +214 -0
  14. data/assets/tiles/Hatsu.svg +309 -0
  15. data/assets/tiles/Man1.svg +276 -0
  16. data/assets/tiles/Man2.svg +286 -0
  17. data/assets/tiles/Man3.svg +292 -0
  18. data/assets/tiles/Man4.svg +292 -0
  19. data/assets/tiles/Man5-Dora.svg +319 -0
  20. data/assets/tiles/Man5.svg +313 -0
  21. data/assets/tiles/Man6.svg +297 -0
  22. data/assets/tiles/Man7.svg +283 -0
  23. data/assets/tiles/Man8.svg +286 -0
  24. data/assets/tiles/Man9.svg +292 -0
  25. data/assets/tiles/Nan.svg +270 -0
  26. data/assets/tiles/Pei.svg +236 -0
  27. data/assets/tiles/Pin1.svg +544 -0
  28. data/assets/tiles/Pin2.svg +400 -0
  29. data/assets/tiles/Pin3.svg +362 -0
  30. data/assets/tiles/Pin4.svg +407 -0
  31. data/assets/tiles/Pin5-Dora.svg +460 -0
  32. data/assets/tiles/Pin5.svg +454 -0
  33. data/assets/tiles/Pin6.svg +477 -0
  34. data/assets/tiles/Pin7.svg +567 -0
  35. data/assets/tiles/Pin8.svg +570 -0
  36. data/assets/tiles/Pin9.svg +623 -0
  37. data/assets/tiles/Shaa.svg +248 -0
  38. data/assets/tiles/Sou1.svg +764 -0
  39. data/assets/tiles/Sou2.svg +372 -0
  40. data/assets/tiles/Sou3.svg +462 -0
  41. data/assets/tiles/Sou4.svg +573 -0
  42. data/assets/tiles/Sou5-Dora.svg +614 -0
  43. data/assets/tiles/Sou5.svg +608 -0
  44. data/assets/tiles/Sou6.svg +688 -0
  45. data/assets/tiles/Sou7.svg +628 -0
  46. data/assets/tiles/Sou8.svg +712 -0
  47. data/assets/tiles/Sou9.svg +748 -0
  48. data/assets/tiles/Ton.svg +242 -0
  49. data/docs/adr/0001-renderer-selection.md +7 -0
  50. data/docs/adr/0002-license.md +5 -0
  51. data/docs/adr/0003-notation.md +5 -0
  52. data/docs/adr/0004-assets.md +5 -0
  53. data/docs/adr/0005-package.md +5 -0
  54. data/docs/release.md +32 -0
  55. data/docs/research/existing-renderers.md +21 -0
  56. data/examples/basic.adoc +13 -0
  57. data/examples/hand.png +0 -0
  58. data/lib/mahjong_render/asciidoctor.rb +32 -0
  59. data/lib/mahjong_render/parser.rb +113 -0
  60. data/lib/mahjong_render/renderer.rb +105 -0
  61. data/lib/mahjong_render/version.rb +8 -0
  62. data/lib/mahjong_render.rb +14 -0
  63. metadata +106 -0
@@ -0,0 +1,248 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+ <svg
5
+ xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
6
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
7
+ xmlns:cc="http://creativecommons.org/ns#"
8
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
9
+ xmlns:svg="http://www.w3.org/2000/svg"
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
12
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13
+ width="300"
14
+ height="400"
15
+ viewBox="0 0 300 400"
16
+ id="svg2"
17
+ version="1.1"
18
+ inkscape:version="0.91 r13725"
19
+ sodipodi:docname="Shaa.svg"
20
+ inkscape:export-filename="C:\Users\Fluffy\Documents\Projects\ExtraRiichi\Shaa.png"
21
+ inkscape:export-xdpi="180"
22
+ inkscape:export-ydpi="180">
23
+ <defs
24
+ id="defs4">
25
+ <inkscape:path-effect
26
+ effect="skeletal"
27
+ id="path-effect7963"
28
+ is_visible="true"
29
+ pattern="m -90.825902,-314.06958 23.03016,41.38503 13.798268,-41.38503 z"
30
+ copytype="repeated_stretched"
31
+ prop_scale="1"
32
+ scale_y_rel="false"
33
+ spacing="0"
34
+ normal_offset="0"
35
+ tang_offset="0"
36
+ prop_units="false"
37
+ vertical_pattern="false"
38
+ fuse_tolerance="0"
39
+ pattern-nodetypes="cccc" />
40
+ <inkscape:path-effect
41
+ effect="skeletal"
42
+ id="path-effect7830"
43
+ is_visible="true"
44
+ pattern="M -12.828427,33.715729 -17,-11 l 9.0000001,0 z"
45
+ copytype="repeated_stretched"
46
+ prop_scale="-1"
47
+ scale_y_rel="false"
48
+ spacing="5.1"
49
+ normal_offset="0"
50
+ tang_offset="0"
51
+ prop_units="false"
52
+ vertical_pattern="false"
53
+ fuse_tolerance="0"
54
+ pattern-nodetypes="cccc" />
55
+ <linearGradient
56
+ id="linearGradient10055"
57
+ osb:paint="solid">
58
+ <stop
59
+ style="stop-color:#000000;stop-opacity:1;"
60
+ offset="0"
61
+ id="stop10057" />
62
+ </linearGradient>
63
+ <marker
64
+ inkscape:stockid="Arrow1Lstart"
65
+ orient="auto"
66
+ refY="0"
67
+ refX="0"
68
+ id="Arrow1Lstart"
69
+ style="overflow:visible"
70
+ inkscape:isstock="true">
71
+ <path
72
+ id="path4978"
73
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
74
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#ff5c00;stroke-width:1pt;stroke-opacity:1"
75
+ transform="matrix(0.8,0,0,0.8,10,0)"
76
+ inkscape:connector-curvature="0" />
77
+ </marker>
78
+ <clipPath
79
+ clipPathUnits="userSpaceOnUse"
80
+ id="clipPath4243">
81
+ <circle
82
+ style="opacity:1;fill:#000000;fill-opacity:0.29670332;fill-rule:nonzero;stroke:#000000;stroke-width:19.13299942;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
83
+ id="circle4245"
84
+ cx="-264.65997"
85
+ cy="-198.20665"
86
+ r="293.95438" />
87
+ </clipPath>
88
+ <clipPath
89
+ clipPathUnits="userSpaceOnUse"
90
+ id="clipPath7847">
91
+ <ellipse
92
+ style="opacity:1;fill:#822600;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:12;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
93
+ id="ellipse7849"
94
+ cx="394"
95
+ cy="552.36218"
96
+ rx="349.49533"
97
+ ry="216" />
98
+ </clipPath>
99
+ <clipPath
100
+ clipPathUnits="userSpaceOnUse"
101
+ id="clipPath4243-1">
102
+ <circle
103
+ style="opacity:1;fill:#000000;fill-opacity:0.29670332;fill-rule:nonzero;stroke:#000000;stroke-width:19.13299942;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
104
+ id="circle4245-4"
105
+ cx="-264.65997"
106
+ cy="-198.20665"
107
+ r="293.95438" />
108
+ </clipPath>
109
+ <clipPath
110
+ clipPathUnits="userSpaceOnUse"
111
+ id="clipPath7876">
112
+ <circle
113
+ style="opacity:1;fill:#000000;fill-opacity:0.29670332;fill-rule:nonzero;stroke:#000000;stroke-width:19.13299942;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
114
+ id="circle7878"
115
+ cx="-264.65997"
116
+ cy="-198.20665"
117
+ r="293.95438" />
118
+ </clipPath>
119
+ <clipPath
120
+ clipPathUnits="userSpaceOnUse"
121
+ id="clipPath14693">
122
+ <rect
123
+ style="opacity:1;fill:#a53c3c;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
124
+ id="rect14695"
125
+ width="131.78395"
126
+ height="168.82127"
127
+ x="-332.59583"
128
+ y="383.49765"
129
+ rx="1.2551664"
130
+ ry="3.7514515"
131
+ transform="matrix(0.99939083,-0.03489951,0.03489951,0.99939083,0,0)" />
132
+ </clipPath>
133
+ <clipPath
134
+ clipPathUnits="userSpaceOnUse"
135
+ id="clipPath14952">
136
+ <ellipse
137
+ style="opacity:1;fill:#a53c3c;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:7;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
138
+ id="ellipse14954"
139
+ cx="-271.34384"
140
+ cy="647.25604"
141
+ rx="69.057365"
142
+ ry="116.91089"
143
+ transform="matrix(0.99939083,-0.03489951,0.03489951,0.99939083,0,0)" />
144
+ </clipPath>
145
+ </defs>
146
+ <sodipodi:namedview
147
+ id="base"
148
+ pagecolor="#aeffff"
149
+ bordercolor="#666666"
150
+ borderopacity="1"
151
+ inkscape:pageopacity="0"
152
+ inkscape:pageshadow="2"
153
+ inkscape:zoom="1.0109639"
154
+ inkscape:cx="-92.357138"
155
+ inkscape:cy="342.0988"
156
+ inkscape:document-units="px"
157
+ inkscape:current-layer="layer1"
158
+ showgrid="true"
159
+ inkscape:window-width="1920"
160
+ inkscape:window-height="1017"
161
+ inkscape:window-x="1912"
162
+ inkscape:window-y="-8"
163
+ inkscape:window-maximized="1"
164
+ showguides="true"
165
+ inkscape:guide-bbox="true"
166
+ units="px">
167
+ <inkscape:grid
168
+ type="xygrid"
169
+ id="grid4774"
170
+ visible="true"
171
+ dotted="false"
172
+ color="#3f3fff"
173
+ opacity="0.03921569"
174
+ empcolor="#3f3fff"
175
+ empopacity="0.07843137"
176
+ enabled="false" />
177
+ <sodipodi:guide
178
+ position="150,200"
179
+ orientation="0,1"
180
+ id="guide8231"
181
+ inkscape:label=""
182
+ inkscape:color="rgb(0,0,255)" />
183
+ <sodipodi:guide
184
+ position="150,200"
185
+ orientation="1,0"
186
+ id="guide8233"
187
+ inkscape:label=""
188
+ inkscape:color="rgb(0,0,255)" />
189
+ </sodipodi:namedview>
190
+ <metadata
191
+ id="metadata7">
192
+ <rdf:RDF>
193
+ <cc:Work
194
+ rdf:about="">
195
+ <dc:format>image/svg+xml</dc:format>
196
+ <dc:type
197
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
198
+ <dc:title />
199
+ </cc:Work>
200
+ </rdf:RDF>
201
+ </metadata>
202
+ <g
203
+ inkscape:label="Layer 1"
204
+ inkscape:groupmode="layer"
205
+ id="layer1"
206
+ transform="translate(0,-652.36216)">
207
+ <g
208
+ id="g4192"
209
+ transform="matrix(0.85008915,0,0,0.93538583,19.53046,57.10894)">
210
+ <path
211
+ sodipodi:nodetypes="cccccccc"
212
+ inkscape:connector-curvature="0"
213
+ id="path4166"
214
+ d="m 18.30334,756.6 c -9.5861174,1.25345 -21.0440188,-11.12964 -7.344369,-14.65998 43.689934,-8.44524 191.763199,-31.91375 208.715039,-38.96975 14.88198,-4.47664 48.7794,19.64597 69.77151,30.82355 13.03521,7.62589 7.09752,16.27427 -2.93775,20.17489 -8.12469,2.44737 -55.98052,6.84692 -81.61317,3.75897 -4.8897,-0.5 -3.03411,-12.30852 -13.95543,-14.00216 C 140.83486,734.41525 69.224299,750.33502 18.30334,756.6 Z"
215
+ style="fill:#19328c;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
216
+ <path
217
+ sodipodi:nodetypes="cccsccccccsc"
218
+ inkscape:connector-curvature="0"
219
+ id="path4168"
220
+ d="m 202.30089,755.15533 c -1.27562,3.78866 -1.92477,9.05905 -4.62306,10.31729 -5.17933,1.7767 -10.93285,0.56235 -13.80762,5.00084 -4.18958,6.73156 -29.81038,25.81302 -47.58108,39.89277 -5.03872,3.99218 -13.55856,1.05692 -14.10863,-6.38647 l -0.0687,27.46438 12.61993,-0.6238 c 10.98748,-8.58886 41.27908,-37.35888 54.83042,-37.69627 10.77175,-0.85493 23.24146,-4.16643 26.20981,-11.33902 2.49974,-6.40744 -4.91423,-10.92996 -4.22864,-14.50428 1.06948,-4.17667 9.93603,-8.48091 12.90992,-8.51388 5.07625,-0.0563 -20.88362,-7.64511 -22.15235,-3.61156 z"
221
+ style="fill:#19328c;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
222
+ <path
223
+ sodipodi:nodetypes="ccccccccccccc"
224
+ inkscape:connector-curvature="0"
225
+ id="path4170"
226
+ d="M 44.513437,845.65221 C 96.654824,833.25125 219.71831,794.8025 237.75017,801.99454 c 22.3396,10.87105 63.54417,36.44588 64.11439,47.24215 0.22691,10.50433 0.0984,11.39774 -8.75819,19.87413 -13.17018,12.93087 -55.35363,77.18637 -61.49898,101.9057 -1.42211,6.27152 -0.44292,18.40166 -5.16715,23.4281 -6.61336,7.36518 -88.04586,-1.12959 -141.055824,-3.22941 -17.921009,-0.60114 -26.244151,-18.98182 0.533046,-19.54016 34.105198,-0.61411 92.367578,-2.02228 99.275418,-10.49309 6.23883,-7.95297 49.26453,-97.45139 49.36461,-107.09074 0.10549,-6.04568 -10.73558,-20.20992 -17.19309,-24.29398 -7.88187,-5.57042 -118.387423,28.03071 -167.577947,35.01891 z"
227
+ style="fill:#19328c;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
228
+ <path
229
+ sodipodi:nodetypes="ccccc"
230
+ inkscape:connector-curvature="0"
231
+ id="path4172"
232
+ d="m 22.789896,858.99298 c 13.914207,26.906 43.909736,76.58459 55.890318,124.51516 l 32.083776,-2.12639 C 102.82771,945.31445 83.44735,884.02726 64.641487,853.9626 30.77162,800.25976 -5.5262875,807.3679 22.789896,858.99298 Z"
233
+ style="fill:#19328c;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
234
+ <path
235
+ sodipodi:nodetypes="ccccc"
236
+ inkscape:connector-curvature="0"
237
+ id="path4174"
238
+ d="m 121.1644,783.92288 c -3.21262,-15.5446 -15.49505,-12.91539 -13.58709,3.49686 l 18.46383,193.39277 14.14333,-0.69937 z"
239
+ style="fill:#19328c;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
240
+ <path
241
+ sodipodi:nodetypes="ccccc"
242
+ inkscape:connector-curvature="0"
243
+ id="path4176"
244
+ d="m 189.6572,785.11604 -13.32425,0 -25.12742,191.8783 12.92012,0 z"
245
+ style="fill:#19328c;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
246
+ </g>
247
+ </g>
248
+ </svg>