doc/api/DXOpal/Font.html in dxopal-1.5.1 vs doc/api/DXOpal/Font.html in dxopal-1.5.2

- old
+ new

@@ -4,19 +4,19 @@ <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title> Class: DXOpal::Font - &mdash; Documentation by YARD 0.9.16 + &mdash; Documentation by YARD 0.9.26 </title> - <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" /> + <link rel="stylesheet" href="../css/style.css" type="text/css" /> - <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" /> + <link rel="stylesheet" href="../css/common.css" type="text/css" /> -<script type="text/javascript" charset="utf-8"> +<script type="text/javascript"> pathId = "DXOpal::Font"; relpath = '../'; </script> @@ -92,11 +92,11 @@ <dl> <dt>Defined in:</dt> - <dd>opal/dxopal/font.rb</dd> + <dd>lib/dxopal/font.rb</dd> </dl> </div> <h2>Overview</h2><div class="docstring"> @@ -225,10 +225,32 @@ <li class="public "> <span class="summary_signature"> + <a href="#get_width-instance_method" title="#get_width (instance method)">#<strong>get_width</strong>(string) &#x21d2; Object </a> + + + + </span> + + + + + + + + + + <span class="summary_desc"><div class='inline'></div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(size, fontname = nil, option = {}) &#x21d2; Font </a> </span> @@ -288,11 +310,11 @@ </h3><div class="docstring"> <div class="discussion"> -<p>Returns a new instance of Font</p> +<p>Returns a new instance of Font.</p> </div> </div> <div class="tags"> @@ -309,11 +331,11 @@ 10 11 12</pre> </td> <td> - <pre class="code"><span class="info file"># File 'opal/dxopal/font.rb', line 8</span> + <pre class="code"><span class="info file"># File 'lib/dxopal/font.rb', line 8</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_size'>size</span><span class='comma'>,</span> <span class='id identifier rubyid_fontname'>fontname</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_option'>option</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span> <span class='ivar'>@size</span> <span class='op'>=</span> <span class='id identifier rubyid_size'>size</span> <span class='ivar'>@orig_fontname</span> <span class='op'>=</span> <span class='id identifier rubyid_fontname'>fontname</span> <span class='ivar'>@fontname</span> <span class='op'>=</span> <span class='id identifier rubyid_fontname'>fontname</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>sans-serif</span><span class='tstring_end'>&quot;</span></span> @@ -346,11 +368,11 @@ 5</pre> </td> <td> - <pre class="code"><span class="info file"># File 'opal/dxopal/font.rb', line 5</span> + <pre class="code"><span class="info file"># File 'lib/dxopal/font.rb', line 5</span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_default'>default</span><span class='semicolon'>;</span> <span class='cvar'>@@default</span> <span class='op'>||=</span> <span class='const'><span class='object_link'><a href="" title="DXOpal::Font (class)">Font</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="DXOpal::Font#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='int'>24</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre> </td> </tr> </table> @@ -372,11 +394,11 @@ 6</pre> </td> <td> - <pre class="code"><span class="info file"># File 'opal/dxopal/font.rb', line 6</span> + <pre class="code"><span class="info file"># File 'lib/dxopal/font.rb', line 6</span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_default='>default=</span><span class='lparen'>(</span><span class='id identifier rubyid_f'>f</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='cvar'>@@default</span> <span class='op'>=</span> <span class='id identifier rubyid_f'>f</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre> </td> </tr> </table> @@ -412,16 +434,16 @@ <tr> <td> <pre class="lines"> -18 -19 -20</pre> +23 +24 +25</pre> </td> <td> - <pre class="code"><span class="info file"># File 'opal/dxopal/font.rb', line 18</span> + <pre class="code"><span class="info file"># File 'lib/dxopal/font.rb', line 23</span> <span class='kw'>def</span> <span class='id identifier rubyid__spec_str'>_spec_str</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='ivar'>@size</span><span class='embexpr_end'>}</span><span class='tstring_content'>px </span><span class='embexpr_beg'>#{</span><span class='ivar'>@fontname</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>end</span></pre> </td> @@ -445,19 +467,51 @@ 15</pre> </td> <td> - <pre class="code"><span class="info file"># File 'opal/dxopal/font.rb', line 15</span> + <pre class="code"><span class="info file"># File 'lib/dxopal/font.rb', line 15</span> <span class='kw'>def</span> <span class='id identifier rubyid_fontname'>fontname</span><span class='semicolon'>;</span> <span class='ivar'>@orig_fontname</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> + <h3 class="signature " id="get_width-instance_method"> + + #<strong>get_width</strong>(string) &#x21d2; <tt>Object</tt> + + + + + +</h3><table class="source_code"> + <tr> + <td> + <pre class="lines"> + + +17 +18 +19 +20</pre> + </td> + <td> + <pre class="code"><span class="info file"># File 'lib/dxopal/font.rb', line 17</span> + +<span class='kw'>def</span> <span class='id identifier rubyid_get_width'>get_width</span><span class='lparen'>(</span><span class='id identifier rubyid_string'>string</span><span class='rparen'>)</span> + <span class='id identifier rubyid_canvas'>canvas</span> <span class='op'>=</span> <span class='const'>Native</span><span class='lparen'>(</span><span class='backtick'>`</span><span class='tstring_content'>document.getElementById(&#39;dxopal-canvas&#39;)</span><span class='tstring_end'>`</span></span><span class='rparen'>)</span> + <span class='id identifier rubyid_canvas'>canvas</span><span class='period'>.</span><span class='id identifier rubyid_getContext'>getContext</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>2d</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_measureText'>measureText</span><span class='lparen'>(</span><span class='id identifier rubyid_string'>string</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_width'>width</span> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> <h3 class="signature " id="size-instance_method"> #<strong>size</strong> &#x21d2; <tt>Object</tt> @@ -471,11 +525,11 @@ 14</pre> </td> <td> - <pre class="code"><span class="info file"># File 'opal/dxopal/font.rb', line 14</span> + <pre class="code"><span class="info file"># File 'lib/dxopal/font.rb', line 14</span> <span class='kw'>def</span> <span class='id identifier rubyid_size'>size</span><span class='semicolon'>;</span> <span class='ivar'>@size</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre> </td> </tr> </table> @@ -484,12 +538,12 @@ </div> </div> <div id="footer"> - Generated on Sat Sep 29 15:56:47 2018 by + Generated on Tue Dec 29 11:37:23 2020 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> - 0.9.16 (ruby-2.5.1). + 0.9.26 (ruby-2.7.0). </div> </div> </body> </html> \ No newline at end of file