doc/classes/C64GeosFile.src/M000514.html in ripxplore-0.17.0 vs doc/classes/C64GeosFile.src/M000514.html in ripxplore-0.17.1

- old
+ new

@@ -3,37 +3,16 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> - <title>to_icon (C64GeosFile)</title> + <title>icon_width (C64GeosFile)</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> </head> <body class="standalone-code"> - <pre><span class="ruby-comment cmt"># File lib/native_file_types/c64/C64GeosFile.rb, line 74</span> -<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_icon</span> - <span class="ruby-identifier">canvas</span> = <span class="ruby-constant">PNG</span><span class="ruby-operator">::</span><span class="ruby-constant">Canvas</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">icon_width</span>, <span class="ruby-identifier">icon_height</span>, <span class="ruby-constant">PNG</span><span class="ruby-operator">::</span><span class="ruby-constant">Color</span><span class="ruby-operator">::</span><span class="ruby-constant">Green</span> - - <span class="ruby-identifier">buffer</span>=<span class="ruby-identifier">icon_bitmap</span> - <span class="ruby-identifier">icon_height</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">y</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">row_data</span>=<span class="ruby-identifier">buffer</span>[<span class="ruby-identifier">y</span><span class="ruby-operator">*</span><span class="ruby-value">3</span>,<span class="ruby-value">3</span>] - <span class="ruby-identifier">x</span>=<span class="ruby-value">0</span> - <span class="ruby-identifier">row_data</span>.<span class="ruby-identifier">each_byte</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">byte</span><span class="ruby-operator">|</span> - <span class="ruby-value">8</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">bit_offset</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">bitmask</span>=<span class="ruby-value">0</span><span class="ruby-identifier">b10000000</span><span class="ruby-operator">&gt;&gt;</span><span class="ruby-identifier">bit_offset</span> -<span class="ruby-comment cmt"># puts &quot;y #{y} x #{x} byte #{&quot;%08b&quot; % byte} bit #{bit_offset} #{&quot;%08b&quot; % bitmask}&quot; </span> - <span class="ruby-keyword kw">if</span> ((<span class="ruby-identifier">byte</span> <span class="ruby-operator">&amp;</span> <span class="ruby-identifier">bitmask</span>)<span class="ruby-operator">==</span><span class="ruby-identifier">bitmask</span>) <span class="ruby-keyword kw">then</span> - <span class="ruby-identifier">canvas</span>[<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>]= <span class="ruby-identifier">icon_foreground</span> - <span class="ruby-keyword kw">else</span> - <span class="ruby-identifier">canvas</span>[<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>]= <span class="ruby-identifier">icon_background</span> - <span class="ruby-keyword kw">end</span> - <span class="ruby-identifier">x</span><span class="ruby-operator">+=</span><span class="ruby-value">1</span> - <span class="ruby-keyword kw">end</span> - <span class="ruby-keyword kw">end</span> - <span class="ruby-keyword kw">end</span> - <span class="ruby-identifier">png</span> = <span class="ruby-constant">PNG</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">canvas</span> - <span class="ruby-identifier">result</span>=<span class="ruby-identifier">png</span>.<span class="ruby-identifier">raw_bytes</span> - <span class="ruby-identifier">result</span> + <pre><span class="ruby-comment cmt"># File lib/native_file_types/c64/C64GeosFile.rb, line 99</span> +<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">icon_width</span> + <span class="ruby-value">8</span><span class="ruby-operator">*</span><span class="ruby-value">3</span> <span class="ruby-keyword kw">end</span></pre> </body> </html> \ No newline at end of file