updated docs
[sdlgit/SDL-Site.git] / pages / SDL-Pango.html-inc
index 2e36d02..0aaf1be 100644 (file)
@@ -23,7 +23,7 @@
 <li><a href="#create_surface_draw">create_surface_draw</a></li>
 </ul>
 </li>
-<li><a href="#AUTHOR">AUTHOR</a></li>
+<li><a href="#AUTHORS">AUTHORS</a></li>
 <li><a href="#SEE_ALSO">SEE ALSO</a>
 </li>
 </ul><hr />
@@ -53,7 +53,7 @@
 
  SDL::Pango::init();
 
- my $context = new SDL::Pango::Context;
+ my $context = SDL::Pango::Context-&gt;new;
  SDL::Pango::set_default_color($context, 0xA7C344FF, 0);
  SDL::Pango::set_markup($context, 'Hallo &lt;b&gt;W&lt;span foreground=&quot;red&quot;&gt;o&lt;/span&gt;&lt;i&gt;r&lt;/i&gt;&lt;u&gt;l&lt;/u&gt;d&lt;/b&gt;!', -1);
 
 </div>
 <h1 id="CONSTANTS">CONSTANTS</h1><p><a href="#TOP" class="toplink">Top</a></p>
 <div id="CONSTANTS_CONTENT">
-<p>The constants are not exported by default. You can export them into your namespace by doing:</p>
-<pre> use SDL::Pango ':direction';
+<p>The constants are exported by default. You can avoid this by doing:</p>
+<pre> use SDL::Pango ();
 
 </pre>
-<p>or</p>
-<pre> use SDL::Pango ':all';
-
-</pre>
-<p>or access them directly:</p>
+<p>and access them directly:</p>
 <pre> SDL::Pango::SDLPANGO_DIRECTION_NEUTRAL;
 
 </pre>
-<p>Available constants:</p>
+<p>or by choosing the export tags below:</p>
+<p>Export tag: ':align'</p>
+<dl>
+       <dt>SDLPANGO_ALIGN_LEFT</dt>
+       <dd>
+               <p>Left alignment</p>
+       </dd>
+       <dt>SDLPANGO_ALIGN_CENTER</dt>
+       <dd>
+               <p>Centered</p>
+       </dd>
+       <dt>SDLPANGO_ALIGN_RIGHT</dt>
+       <dd>
+               <p>Right alignment</p>
+       </dd>
+</dl>
+<p>Export tag: ':direction'</p>
 <dl>
        <dt>SDLPANGO_DIRECTION_LTR</dt>
        <dd>
@@ -157,9 +169,17 @@ background.</p>
 <h2 id="set_text">set_text</h2>
 <div id="set_text_CONTENT">
 <pre> SDL::Pango::set_text($context, $text, $length);
+ SDL::Pango::set_text($context, $text, $length, $alignment);
 
 </pre>
 <p>Set plain text to context. Text must be utf-8. <code>$length</code> chars will be rendered, pass <code>-1</code> to render the whole text.</p>
+<p><code>$alignment</code> can be:</p>
+<ul>
+               <li>SDLPANGO_ALIGN_LEFT (default)       </li>
+               <li>SDLPANGO_ALIGN_CENTER       </li>
+               <li>SDLPANGO_ALIGN_RIGHT</li>
+</ul>
+
 
 </div>
 <h2 id="set_markup">set_markup</h2>
@@ -253,9 +273,9 @@ background.</p>
 <p>Creates a new surface and draws the text/markup. You can specify the attributes of the surfaces using <a href="/SDL-Pango.html#set_surface_create_args">SDL::Pango::set_surface_create_args</a>.</p>
 
 </div>
-<h1 id="AUTHOR">AUTHOR</h1><p><a href="#TOP" class="toplink">Top</a></p>
-<div id="AUTHOR_CONTENT">
-<p>Tobias Leich [FROGGS]</p>
+<h1 id="AUTHORS">AUTHORS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="AUTHORS_CONTENT">
+<p>See <b>AUTHORS</b> in <cite>SDL</cite>.</p>
 
 </div>
 <h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>