X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pages%2FSDL-Pango.html-inc;h=0aaf1be4555bab8ae35abd1c0ead52e32bc0ab80;hb=a3de848879a5553418ed11fb193c4bf286ca7120;hp=2e36d02533da096d305c2af316e0d59de867a42c;hpb=36bc514727c7359c24c6fd23c7103372f4be900c;p=sdlgit%2FSDL-Site.git diff --git a/pages/SDL-Pango.html-inc b/pages/SDL-Pango.html-inc index 2e36d02..0aaf1be 100644 --- a/pages/SDL-Pango.html-inc +++ b/pages/SDL-Pango.html-inc @@ -23,7 +23,7 @@
  • create_surface_draw
  • -
  • AUTHOR
  • +
  • AUTHORS
  • SEE ALSO

  • @@ -53,7 +53,7 @@ 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); @@ -74,19 +74,31 @@

    CONSTANTS

    Top

    -

    The constants are not exported by default. You can export them into your namespace by doing:

    -
     use SDL::Pango ':direction';
    +

    The constants are exported by default. You can avoid this by doing:

    +
     use SDL::Pango ();
     
     
    -

    or

    -
     use SDL::Pango ':all';
    -
    -
    -

    or access them directly:

    +

    and access them directly:

     SDL::Pango::SDLPANGO_DIRECTION_NEUTRAL;
     
     
    -

    Available constants:

    +

    or by choosing the export tags below:

    +

    Export tag: ':align'

    +
    +
    SDLPANGO_ALIGN_LEFT
    +
    +

    Left alignment

    +
    +
    SDLPANGO_ALIGN_CENTER
    +
    +

    Centered

    +
    +
    SDLPANGO_ALIGN_RIGHT
    +
    +

    Right alignment

    +
    +
    +

    Export tag: ':direction'

    SDLPANGO_DIRECTION_LTR
    @@ -157,9 +169,17 @@ background.

    set_text

     SDL::Pango::set_text($context, $text, $length);
    + SDL::Pango::set_text($context, $text, $length, $alignment);
     
     

    Set plain text to context. Text must be utf-8. $length chars will be rendered, pass -1 to render the whole text.

    +

    $alignment can be:

    +
      +
    • SDLPANGO_ALIGN_LEFT (default)
    • +
    • SDLPANGO_ALIGN_CENTER
    • +
    • SDLPANGO_ALIGN_RIGHT
    • +
    +

    set_markup

    @@ -253,9 +273,9 @@ background.

    Creates a new surface and draws the text/markup. You can specify the attributes of the surfaces using SDL::Pango::set_surface_create_args.

    -

    AUTHOR

    Top

    -
    -

    Tobias Leich [FROGGS]

    +

    AUTHORS

    Top

    +
    +

    See AUTHORS in SDL.

    SEE ALSO

    Top