imagetooth 0.2.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,390 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: ImageTooth</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">ImageTooth</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../files/lib/image_tooth_rb.html">
59
- lib/image_tooth.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- Object
69
- </td>
70
- </tr>
71
- </table>
72
- </div>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
-
78
-
79
- <div id="contextContent">
80
-
81
-
82
-
83
- </div>
84
-
85
- <div id="method-list">
86
- <h3 class="section-bar">Methods</h3>
87
-
88
- <div class="name-list">
89
- <a href="#M000003">chars_colors</a>&nbsp;&nbsp;
90
- <a href="#M000002">colors=</a>&nbsp;&nbsp;
91
- <a href="#M000012">create_folders</a>&nbsp;&nbsp;
92
- <a href="#M000007">file_name2hash_faces</a>&nbsp;&nbsp;
93
- <a href="#M000008">gen_all</a>&nbsp;&nbsp;
94
- <a href="#M000004">graph_base</a>&nbsp;&nbsp;
95
- <a href="#M000009">method_missing</a>&nbsp;&nbsp;
96
- <a href="#M000001">new</a>&nbsp;&nbsp;
97
- <a href="#M000005">paint</a>&nbsp;&nbsp;
98
- <a href="#M000006">paint_extract</a>&nbsp;&nbsp;
99
- <a href="#M000010">permut</a>&nbsp;&nbsp;
100
- <a href="#M000011">wrap_color</a>&nbsp;&nbsp;
101
- </div>
102
- </div>
103
-
104
- </div>
105
-
106
-
107
- <!-- if includes -->
108
-
109
- <div id="section">
110
-
111
-
112
-
113
-
114
-
115
- <div id="attribute-list">
116
- <h3 class="section-bar">Attributes</h3>
117
-
118
- <div class="name-list">
119
- <table>
120
- <tr class="top-aligned-row context-row">
121
- <td class="context-item-name">root_path</td>
122
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
123
- <td class="context-item-desc"></td>
124
- </tr>
125
- </table>
126
- </div>
127
- </div>
128
-
129
-
130
-
131
- <!-- if method_list -->
132
- <div id="methods">
133
- <h3 class="section-bar">Public Class methods</h3>
134
-
135
- <div id="method-M000003" class="method-detail">
136
- <a name="M000003"></a>
137
-
138
- <div class="method-heading">
139
- <a href="ImageTooth.src/M000003.html" target="Code" class="method-signature"
140
- onclick="popupCode('ImageTooth.src/M000003.html');return false;">
141
- <span class="method-name">chars_colors</span><span class="method-args">()</span>
142
- </a>
143
- </div>
144
-
145
- <div class="method-description">
146
- </div>
147
- </div>
148
-
149
- <div id="method-M000002" class="method-detail">
150
- <a name="M000002"></a>
151
-
152
- <div class="method-heading">
153
- <a href="ImageTooth.src/M000002.html" target="Code" class="method-signature"
154
- onclick="popupCode('ImageTooth.src/M000002.html');return false;">
155
- <span class="method-name">colors=</span><span class="method-args">(hash_colors)</span>
156
- </a>
157
- </div>
158
-
159
- <div class="method-description">
160
- </div>
161
- </div>
162
-
163
- <div id="method-M000001" class="method-detail">
164
- <a name="M000001"></a>
165
-
166
- <div class="method-heading">
167
- <a href="ImageTooth.src/M000001.html" target="Code" class="method-signature"
168
- onclick="popupCode('ImageTooth.src/M000001.html');return false;">
169
- <span class="method-name">new</span><span class="method-args">()</span>
170
- </a>
171
- </div>
172
-
173
- <div class="method-description">
174
- </div>
175
- </div>
176
-
177
- <h3 class="section-bar">Public Instance methods</h3>
178
-
179
- <div id="method-M000012" class="method-detail">
180
- <a name="M000012"></a>
181
-
182
- <div class="method-heading">
183
- <a href="ImageTooth.src/M000012.html" target="Code" class="method-signature"
184
- onclick="popupCode('ImageTooth.src/M000012.html');return false;">
185
- <span class="method-name">create_folders</span><span class="method-args">()</span>
186
- </a>
187
- </div>
188
-
189
- <div class="method-description">
190
- <p>
191
- Create all folders ones for each color and 2 more for extractions (x/ and
192
- t/)
193
- </p>
194
- </div>
195
- </div>
196
-
197
- <div id="method-M000007" class="method-detail">
198
- <a name="M000007"></a>
199
-
200
- <div class="method-heading">
201
- <a href="ImageTooth.src/M000007.html" target="Code" class="method-signature"
202
- onclick="popupCode('ImageTooth.src/M000007.html');return false;">
203
- <span class="method-name">file_name2hash_faces</span><span class="method-args">(file_name)</span>
204
- </a>
205
- </div>
206
-
207
- <div class="method-description">
208
- <p>
209
- Generates a hash based on tooth&#8216;s file name, where keys are the
210
- tooth&#8216;s faces and value is the colour to painted.
211
- </p>
212
- </div>
213
- </div>
214
-
215
- <div id="method-M000008" class="method-detail">
216
- <a name="M000008"></a>
217
-
218
- <div class="method-heading">
219
- <a href="ImageTooth.src/M000008.html" target="Code" class="method-signature"
220
- onclick="popupCode('ImageTooth.src/M000008.html');return false;">
221
- <span class="method-name">gen_all</span><span class="method-args">()</span>
222
- </a>
223
- </div>
224
-
225
- <div class="method-description">
226
- <p>
227
- Generates all tooth&#8216;s images in a folder structure like this: b/ w/
228
- n/ r/ g/
229
- </p>
230
- <ul>
231
- <li>b/ - Blue (those wich it&#8216;s top face is blue)
232
-
233
- </li>
234
- <li>w/ - White (those wich it&#8216;s top face is white)
235
-
236
- </li>
237
- <li>n/ - Black (those wich it&#8216;s top face is Black)
238
-
239
- </li>
240
- <li>g/ - Green (those wich it&#8216;s top face is Green)
241
-
242
- </li>
243
- <li>t/ - To extrate (this will be extracted)
244
-
245
- </li>
246
- <li>x/ - Extracted (this was extracted)
247
-
248
- </li>
249
- </ul>
250
- </div>
251
- </div>
252
-
253
- <div id="method-M000004" class="method-detail">
254
- <a name="M000004"></a>
255
-
256
- <div class="method-heading">
257
- <a href="ImageTooth.src/M000004.html" target="Code" class="method-signature"
258
- onclick="popupCode('ImageTooth.src/M000004.html');return false;">
259
- <span class="method-name">graph_base</span><span class="method-args">(file = @file_name_base)</span>
260
- </a>
261
- </div>
262
-
263
- <div class="method-description">
264
- <p>
265
- Generate the base tooth image, with all faces in white color. This are
266
- store in root_path/base_path.png
267
- </p>
268
- </div>
269
- </div>
270
-
271
- <div id="method-M000009" class="method-detail">
272
- <a name="M000009"></a>
273
-
274
- <div class="method-heading">
275
- <a href="ImageTooth.src/M000009.html" target="Code" class="method-signature"
276
- onclick="popupCode('ImageTooth.src/M000009.html');return false;">
277
- <span class="method-name">method_missing</span><span class="method-args">(method_name, *args)</span>
278
- </a>
279
- </div>
280
-
281
- <div class="method-description">
282
- </div>
283
- </div>
284
-
285
- <div id="method-M000005" class="method-detail">
286
- <a name="M000005"></a>
287
-
288
- <div class="method-heading">
289
- <a href="ImageTooth.src/M000005.html" target="Code" class="method-signature"
290
- onclick="popupCode('ImageTooth.src/M000005.html');return false;">
291
- <span class="method-name">paint</span><span class="method-args">(hash_faces, name_file)</span>
292
- </a>
293
- </div>
294
-
295
- <div class="method-description">
296
- <p>
297
- Paints the faces of the tooth image on hash colors based. The tooth&#8216;s
298
- filename represents the faces painted, The filename&#8216;s characters are:
299
- </p>
300
- <ul>
301
- <li>w - White
302
-
303
- </li>
304
- <li>g - Green
305
-
306
- </li>
307
- <li>b - Blue
308
-
309
- </li>
310
- <li>n - Black
311
-
312
- </li>
313
- <li>r - Red
314
-
315
- </li>
316
- <li>t - To extract
317
-
318
- </li>
319
- <li>x - Extracted
320
-
321
- </li>
322
- </ul>
323
- <p>
324
- and are ordered, begining on the upper face of the the tooth and moving
325
- clockwise ending on the center face.
326
- </p>
327
- <pre>
328
- Example: wrrgw.png
329
- </pre>
330
- </div>
331
- </div>
332
-
333
- <div id="method-M000006" class="method-detail">
334
- <a name="M000006"></a>
335
-
336
- <div class="method-heading">
337
- <a href="ImageTooth.src/M000006.html" target="Code" class="method-signature"
338
- onclick="popupCode('ImageTooth.src/M000006.html');return false;">
339
- <span class="method-name">paint_extract</span><span class="method-args">(color, filename)</span>
340
- </a>
341
- </div>
342
-
343
- <div class="method-description">
344
- </div>
345
- </div>
346
-
347
- <div id="method-M000010" class="method-detail">
348
- <a name="M000010"></a>
349
-
350
- <div class="method-heading">
351
- <a href="ImageTooth.src/M000010.html" target="Code" class="method-signature"
352
- onclick="popupCode('ImageTooth.src/M000010.html');return false;">
353
- <span class="method-name">permut</span><span class="method-args">()</span>
354
- </a>
355
- </div>
356
-
357
- <div class="method-description">
358
- <p>
359
- Generates all permutations tooth&#8216;s filenames.
360
- </p>
361
- </div>
362
- </div>
363
-
364
- <div id="method-M000011" class="method-detail">
365
- <a name="M000011"></a>
366
-
367
- <div class="method-heading">
368
- <a href="ImageTooth.src/M000011.html" target="Code" class="method-signature"
369
- onclick="popupCode('ImageTooth.src/M000011.html');return false;">
370
- <span class="method-name">wrap_color</span><span class="method-args">(char_color)</span>
371
- </a>
372
- </div>
373
-
374
- <div class="method-description">
375
- </div>
376
- </div>
377
-
378
-
379
- </div>
380
-
381
-
382
- </div>
383
-
384
-
385
- <div id="validator-badges">
386
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
387
- </div>
388
-
389
- </body>
390
- </html>
@@ -1,20 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>new (ImageTooth)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/image_tooth.rb, line 28</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
15
- <span class="ruby-ivar">@root_path</span> = <span class="ruby-value str">'./'</span>
16
- <span class="ruby-ivar">@file_name_base</span> = <span class="ruby-value str">'base_tooth.png'</span>
17
- <span class="ruby-ivar">@extension</span> = <span class="ruby-value str">&quot;.png&quot;</span>
18
- <span class="ruby-keyword kw">end</span></pre>
19
- </body>
20
- </html>
@@ -1,18 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>colors= (ImageTooth)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/image_tooth.rb, line 34</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-constant">ImageTooth</span>.<span class="ruby-identifier">colors=</span>(<span class="ruby-identifier">hash_colors</span>)
15
- <span class="ruby-ivar">@@colors</span> = <span class="ruby-identifier">hash_colors</span>
16
- <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,18 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>chars_colors (ImageTooth)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/image_tooth.rb, line 38</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-constant">ImageTooth</span>.<span class="ruby-identifier">chars_colors</span>
15
- <span class="ruby-ivar">@@colors</span>.<span class="ruby-identifier">keys</span>
16
- <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,29 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>graph_base (ImageTooth)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/image_tooth.rb, line 46</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">graph_base</span> <span class="ruby-identifier">file</span> = <span class="ruby-ivar">@file_name_base</span>
15
- <span class="ruby-identifier">background</span> = <span class="ruby-constant">Image</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">25</span>, <span class="ruby-value">35</span>)
16
- <span class="ruby-identifier">gc</span> = <span class="ruby-constant">Draw</span>.<span class="ruby-identifier">new</span>
17
- <span class="ruby-identifier">gc</span>.<span class="ruby-identifier">stroke</span>(<span class="ruby-value str">'black'</span>)
18
- <span class="ruby-identifier">gc</span>.<span class="ruby-identifier">fill</span>(<span class="ruby-value str">'white'</span>)
19
- <span class="ruby-identifier">gc</span>.<span class="ruby-identifier">rectangle</span>(<span class="ruby-value">6</span>, <span class="ruby-value">6</span>, <span class="ruby-value">18</span>, <span class="ruby-value">28</span>)
20
- <span class="ruby-identifier">gc</span>.<span class="ruby-identifier">line</span>(<span class="ruby-value">0</span>, <span class="ruby-value">0</span>, <span class="ruby-value">6</span>, <span class="ruby-value">6</span>)
21
- <span class="ruby-identifier">gc</span>.<span class="ruby-identifier">line</span>(<span class="ruby-value">24</span>, <span class="ruby-value">0</span>, <span class="ruby-value">18</span>, <span class="ruby-value">6</span>)
22
- <span class="ruby-identifier">gc</span>.<span class="ruby-identifier">line</span>(<span class="ruby-value">0</span>, <span class="ruby-value">35</span>, <span class="ruby-value">6</span>, <span class="ruby-value">28</span>)
23
- <span class="ruby-identifier">gc</span>.<span class="ruby-identifier">line</span>(<span class="ruby-value">25</span>, <span class="ruby-value">35</span>, <span class="ruby-value">18</span>, <span class="ruby-value">28</span>)
24
- <span class="ruby-identifier">gc</span>.<span class="ruby-identifier">draw</span>(<span class="ruby-identifier">background</span>)
25
- <span class="ruby-identifier">background</span>.<span class="ruby-identifier">border!</span>(<span class="ruby-value">1</span>, <span class="ruby-value">1</span>, <span class="ruby-value str">'black'</span>)
26
- <span class="ruby-identifier">background</span>.<span class="ruby-identifier">write</span>( <span class="ruby-node">&quot;#{root_path}/#{file}&quot;</span> )
27
- <span class="ruby-keyword kw">end</span></pre>
28
- </body>
29
- </html>
@@ -1,51 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>paint (ImageTooth)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/image_tooth.rb, line 74</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">paint</span> <span class="ruby-identifier">hash_faces</span>, <span class="ruby-identifier">name_file</span>
15
- <span class="ruby-comment cmt"># FIXME</span>
16
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">graph_base</span>
17
-
18
- <span class="ruby-identifier">tooth</span> = <span class="ruby-constant">Magick</span><span class="ruby-operator">::</span><span class="ruby-constant">Image</span>.<span class="ruby-identifier">read</span>(<span class="ruby-node">&quot;#{@root_path}/#{@file_name_base}&quot;</span>).<span class="ruby-identifier">first</span>
19
- <span class="ruby-identifier">gc</span> = <span class="ruby-constant">Draw</span>.<span class="ruby-identifier">new</span>
20
-
21
- <span class="ruby-identifier">gc</span>.<span class="ruby-identifier">fill</span>(<span class="ruby-identifier">hash_faces</span>[<span class="ruby-identifier">:top</span>])
22
- <span class="ruby-identifier">x</span> = <span class="ruby-value">1</span>
23
- <span class="ruby-identifier">y</span> = <span class="ruby-value">1</span>
24
- <span class="ruby-identifier">gc</span>.<span class="ruby-identifier">polygon</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>, <span class="ruby-identifier">x</span><span class="ruby-operator">+</span><span class="ruby-value">7</span>, <span class="ruby-identifier">y</span><span class="ruby-operator">+</span><span class="ruby-value">5</span>, <span class="ruby-identifier">x</span><span class="ruby-operator">+</span><span class="ruby-value">18</span>, <span class="ruby-identifier">y</span><span class="ruby-operator">+</span><span class="ruby-value">5</span>, <span class="ruby-identifier">x</span><span class="ruby-operator">+</span><span class="ruby-value">23</span>, <span class="ruby-identifier">y</span>)
25
-
26
- <span class="ruby-identifier">gc</span>.<span class="ruby-identifier">fill</span>(<span class="ruby-identifier">hash_faces</span>[<span class="ruby-identifier">:bottom</span>])
27
- <span class="ruby-identifier">x</span> = <span class="ruby-value">3</span>
28
- <span class="ruby-identifier">y</span> = <span class="ruby-value">35</span>
29
- <span class="ruby-identifier">gc</span>.<span class="ruby-identifier">polygon</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>, <span class="ruby-identifier">x</span><span class="ruby-operator">+</span><span class="ruby-value">5</span>, <span class="ruby-identifier">y</span><span class="ruby-operator">-</span><span class="ruby-value">5</span>, <span class="ruby-identifier">x</span><span class="ruby-operator">+</span><span class="ruby-value">16</span>, <span class="ruby-identifier">y</span><span class="ruby-operator">-</span><span class="ruby-value">5</span>, <span class="ruby-identifier">x</span><span class="ruby-operator">+</span><span class="ruby-value">21</span>, <span class="ruby-identifier">y</span>)
30
-
31
- <span class="ruby-identifier">gc</span>.<span class="ruby-identifier">fill</span>(<span class="ruby-identifier">hash_faces</span>[<span class="ruby-identifier">:center</span>])
32
- <span class="ruby-identifier">x</span> = <span class="ruby-value">8</span>
33
- <span class="ruby-identifier">y</span> = <span class="ruby-value">8</span>
34
- <span class="ruby-identifier">gc</span>.<span class="ruby-identifier">rectangle</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>, <span class="ruby-identifier">x</span><span class="ruby-operator">+</span><span class="ruby-value">10</span>, <span class="ruby-identifier">y</span><span class="ruby-operator">+</span><span class="ruby-value">20</span>)
35
-
36
- <span class="ruby-identifier">gc</span>.<span class="ruby-identifier">fill</span>(<span class="ruby-identifier">hash_faces</span>[<span class="ruby-identifier">:right</span>])
37
- <span class="ruby-identifier">x</span> = <span class="ruby-value">20</span>
38
- <span class="ruby-identifier">y</span> = <span class="ruby-value">8</span>
39
- <span class="ruby-identifier">gc</span>.<span class="ruby-identifier">polygon</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>, <span class="ruby-identifier">x</span><span class="ruby-operator">+</span><span class="ruby-value">5</span>, <span class="ruby-identifier">y</span><span class="ruby-operator">-</span><span class="ruby-value">6</span>, <span class="ruby-identifier">x</span><span class="ruby-operator">+</span><span class="ruby-value">5</span>, <span class="ruby-identifier">y</span><span class="ruby-operator">+</span><span class="ruby-value">25</span>, <span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span><span class="ruby-operator">+</span><span class="ruby-value">20</span>)
40
-
41
- <span class="ruby-identifier">gc</span>.<span class="ruby-identifier">fill</span>(<span class="ruby-identifier">hash_faces</span>[<span class="ruby-identifier">:left</span>])
42
- <span class="ruby-identifier">x</span> = <span class="ruby-value">1</span>
43
- <span class="ruby-identifier">y</span> = <span class="ruby-value">35</span>
44
- <span class="ruby-identifier">gc</span>.<span class="ruby-identifier">polygon</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>, <span class="ruby-identifier">x</span><span class="ruby-operator">+</span><span class="ruby-value">5</span>, <span class="ruby-identifier">y</span><span class="ruby-operator">-</span><span class="ruby-value">6</span>, <span class="ruby-identifier">x</span><span class="ruby-operator">+</span><span class="ruby-value">5</span>, <span class="ruby-value">7</span>, <span class="ruby-value">1</span>, <span class="ruby-value">2</span>)
45
-
46
- <span class="ruby-identifier">gc</span>.<span class="ruby-identifier">draw</span>(<span class="ruby-identifier">tooth</span>)
47
- <span class="ruby-identifier">tooth</span>.<span class="ruby-identifier">write</span>(<span class="ruby-node">&quot;#{self.root_path}/#{name_file}&quot;</span>)
48
- <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-node">&quot;#{self.root_path}/#{@file_name_base}&quot;</span>)
49
- <span class="ruby-keyword kw">end</span></pre>
50
- </body>
51
- </html>
@@ -1,32 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>paint_extract (ImageTooth)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/image_tooth.rb, line 111</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">paint_extract</span> <span class="ruby-identifier">color</span>, <span class="ruby-identifier">filename</span>
15
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">graph_base</span>
16
-
17
- <span class="ruby-identifier">tooth</span> = <span class="ruby-constant">Magick</span><span class="ruby-operator">::</span><span class="ruby-constant">Image</span>.<span class="ruby-identifier">read</span>(<span class="ruby-node">&quot;#{@root_path}/#{@file_name_base}&quot;</span>).<span class="ruby-identifier">first</span>
18
- <span class="ruby-identifier">gc</span> = <span class="ruby-constant">Draw</span>.<span class="ruby-identifier">new</span>
19
-
20
- <span class="ruby-identifier">x</span> = <span class="ruby-value">4</span>
21
- <span class="ruby-identifier">y</span> = <span class="ruby-value">10</span>
22
- <span class="ruby-identifier">gc</span>.<span class="ruby-identifier">stroke</span>(<span class="ruby-identifier">color</span>)
23
- <span class="ruby-identifier">gc</span>.<span class="ruby-identifier">stroke_width</span>(<span class="ruby-value">3</span>)
24
- <span class="ruby-identifier">gc</span>.<span class="ruby-identifier">line</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>, <span class="ruby-identifier">x</span><span class="ruby-operator">+</span><span class="ruby-value">19</span>, <span class="ruby-identifier">y</span><span class="ruby-operator">+</span><span class="ruby-value">15</span>)
25
- <span class="ruby-identifier">gc</span>.<span class="ruby-identifier">line</span>(<span class="ruby-identifier">x</span> <span class="ruby-operator">+</span> <span class="ruby-value">18</span>, <span class="ruby-identifier">y</span>, <span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span><span class="ruby-operator">+</span><span class="ruby-value">16</span>)
26
-
27
- <span class="ruby-identifier">gc</span>.<span class="ruby-identifier">draw</span>(<span class="ruby-identifier">tooth</span>)
28
- <span class="ruby-identifier">tooth</span>.<span class="ruby-identifier">write</span>(<span class="ruby-node">&quot;#{self.root_path}/#{filename}#{@extension}&quot;</span>)
29
- <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-node">&quot;#{self.root_path}/#{@file_name_base}&quot;</span>)
30
- <span class="ruby-keyword kw">end</span></pre>
31
- </body>
32
- </html>
@@ -1,25 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>file_name2hash_faces (ImageTooth)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/image_tooth.rb, line 132</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">file_name2hash_faces</span> <span class="ruby-identifier">file_name</span>
15
- <span class="ruby-identifier">desc</span> = <span class="ruby-identifier">file_name</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'.'</span>).<span class="ruby-identifier">first</span>
16
- <span class="ruby-identifier">hash</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
17
- <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:top</span>] = <span class="ruby-ivar">@@colors</span>[<span class="ruby-identifier">desc</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">chr</span>.<span class="ruby-identifier">to_sym</span>]
18
- <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:right</span>] = <span class="ruby-ivar">@@colors</span>[<span class="ruby-identifier">desc</span>[<span class="ruby-value">1</span>].<span class="ruby-identifier">chr</span>.<span class="ruby-identifier">to_sym</span>]
19
- <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:bottom</span>] = <span class="ruby-ivar">@@colors</span>[<span class="ruby-identifier">desc</span>[<span class="ruby-value">2</span>].<span class="ruby-identifier">chr</span>.<span class="ruby-identifier">to_sym</span>]
20
- <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:left</span>] = <span class="ruby-ivar">@@colors</span>[<span class="ruby-identifier">desc</span>[<span class="ruby-value">3</span>].<span class="ruby-identifier">chr</span>.<span class="ruby-identifier">to_sym</span>]
21
- <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:center</span>] = <span class="ruby-ivar">@@colors</span>[<span class="ruby-identifier">desc</span>[<span class="ruby-value">4</span>].<span class="ruby-identifier">chr</span>.<span class="ruby-identifier">to_sym</span>]
22
- <span class="ruby-identifier">hash</span>
23
- <span class="ruby-keyword kw">end</span></pre>
24
- </body>
25
- </html>
@@ -1,31 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>gen_all (ImageTooth)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/image_tooth.rb, line 152</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">gen_all</span>
15
- <span class="ruby-identifier">root_path_aux</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">root_path</span>
16
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">permut</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
17
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">root_path</span> = <span class="ruby-node">&quot;#{root_path_aux}/#{i[0].chr}&quot;</span>
18
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">paint_img</span> <span class="ruby-identifier">i</span>
19
- }
20
-
21
- <span class="ruby-comment cmt">#Generate the 2 extractions marcs</span>
22
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">root_path</span> = <span class="ruby-node">&quot;#{root_path_aux}/t&quot;</span>
23
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">paint2extract</span>
24
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">root_path</span> = <span class="ruby-node">&quot;#{root_path_aux}/x&quot;</span>
25
-
26
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">paint_extracted</span>
27
-
28
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">root_path</span> = <span class="ruby-identifier">root_path_aux</span>
29
- <span class="ruby-keyword kw">end</span></pre>
30
- </body>
31
- </html>