<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 />
SDL::Pango::init();
- my $context = new SDL::Pango::Context;
+ my $context = SDL::Pango::Context->new;
SDL::Pango::set_default_color($context, 0xA7C344FF, 0);
SDL::Pango::set_markup($context, 'Hallo <b>W<span foreground="red">o</span><i>r</i><u>l</u>d</b>!', -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 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>
<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>
<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>