Pango::Layout(3)
π Pango::Layout(3) β the wrapper bestie π
okay so bestie, this page comes from the User Contributed Perl Documentation, and it's all about Pango::Layout β the wrapper for PangoLayout. It's giving main-character text-layout energy, no cap. π
π NAME π
Pango::Layout β wrapper for PangoLayout. Slay. β¨
π HIERARCHY π
Here's the family tree, and yes it's iconic:
Glib::Object
+----Pango::Layout
β¨ METHODS β¨
okay bestie, here's the whole method buffet. Every signature is copied exactly β no renaming, no merging, no invented options. π
layout = Pango::Layout->new ($context)β new layout time. πΈ$context(Pango::Context)
alignment = $layout->get_alignment/$layout->set_alignment ($alignment)β alignment getter/setter duo. π$alignment(Pango::Alignment)
attrlist or undef = $layout->get_attributes/$layout->set_attributes ($attrs)β attributes getter/setter duo. π$attrs(Pango::AttrList or undef)
boolean = $layout->get_auto_dirβ auto-dir getter. β¨ Since: pango 1.4$layout->set_auto_dir ($auto_dir)β auto-dir setter. π$auto_dir(boolean)- Since: pango 1.4
integer = $layout->get_baselineβ baseline getter. Since: pango 1.22$layout->context_changedβ context changed notification. π¦context = $layout->get_contextβ context getter.layout = $src->copyβ copy the layout. π(strong_pos, weak_pos) = $layout->get_cursor_pos ($index)β cursor position, strong and weak. π$index_(integer)
ellipsizemode = $layout->get_ellipsizeβ ellipsize getter. Since: pango 1.6$layout->set_ellipsize ($ellipsize)β ellipsize setter. π$ellipsize(Pango::EllipsizeMode)- Since: pango 1.6
(ink_rect, logical_rect) = $layout->get_extentsβ extents getter. β¨(ink_rect, logical_rect) = $layout->get_pixel_extentsβ pixel extents getter. πΈfontdescription or undef = $layout->get_font_descriptionβ font description getter. Since: pango 1.8$layout->set_font_description ($desc)β font description setter. π$desc(Pango::FontDescription or undef)
integer = $layout->get_heightβ height getter. Since: pango 1.20$layout->set_height ($height)β height setter. π¦$height(integer)- Since: pango 1.20
integer = $layout->get_indentβ indent getter.$layout->set_indent ($newval)β indent setter. π$newval(integer)
array reference = $layout->index_to_pos ($index_)β index to position. β¨$index_(integer)
boolean = $layout->is_ellipsizedβ is it ellipsized? Since: pango 1.16boolean = $layout->is_wrappedβ is it wrapped? Since: pango 1.16layoutiter = $layout->get_iterβ iter getter. πinteger = $layout->get_justifyβ justify getter.$layout->set_justify ($newval)β justify setter. π$newval(integer)
integer = $layout->get_line_countβ line count getter. πlayoutline or undef = $layout->get_line ($line)β line getter.$line(integer)
layoutline or undef = $layout->get_line_readonly ($line)β readonly line getter. β¨$line(integer)- Since: pango 1.16
list = $layout->get_linesβ lines list. πΈlist = $layout->get_lines_readonlyβ readonly lines list. Since: pango 1.16list = $layout->get_log_attrsβ log attrs list. Returns a list ofPango::LogAttr's. π$layout->set_markup ($markup)β set markup. β¨$markup(string)
accel_char = $layout->set_markup_with_accel ($markup, $accel_marker)β markup with accel, returnsaccel_char. π¦$markup(string)$accel_marker(character)
(new_index, new_trailing) = $layout->move_cursor_visually ($strong, $old_index, $old_trailing, $direction)β move cursor visually. π$strong(boolean)$old_index(integer)$old_trailing(integer)$direction(integer)
list = $layout->get_pixel_extentsβ yep,get_pixel_extentsshows up again in the original as alist, so here it is again. π(width, height) = $layout->get_pixel_sizeβ pixel size. πinteger = $layout->get_single_paragraph_modeβ single-paragraph-mode getter. β¨$layout->set_single_paragraph_mode ($newval)β single-paragraph-mode setter. π$newval(integer)
(width, height) = $layout->get_sizeβ size getter. πΈinteger = $layout->get_spacingβ spacing getter.$layout->set_spacing ($newval)β spacing setter. π¦$newval(integer)
tabarray or undef = $layout->get_tabsβ tabs getter.$layout->set_tabs ($tabs)β tabs setter. π$tabs(Pango::TabArray or undef)
string = $layout->get_textβ text getter.$layout->set_text ($text)β text setter. π$text(string)
integer = $layout->get_unknown_glyphs_countβ unknown glyphs count. Since: pango 1.16integer = $layout->get_widthβ width getter.$layout->set_width ($newval)β width setter. β¨$newval(integer)
wrapmode = $layout->get_wrapβ wrap getter.$layout->set_wrap ($wrap)β wrap setter. π$wrap(Pango::WrapMode)
(index, trailing) = $layout->xy_to_index ($x, $y)β xy to index. π$x(integer)$y(integer)
π¦ ENUMS AND FLAGS π¦
okay bestie, here are the enum/flag vibes. Names and values are exact. π
π enum Pango::Alignment π
'left'/'PANGO_ALIGN_LEFT'β left alignment, naturally. πΈ'center'/'PANGO_ALIGN_CENTER'β center alignment. π'right'/'PANGO_ALIGN_RIGHT'β right alignment. β¨
π enum Pango::EllipsizeMode π
'none'/'PANGO_ELLIPSIZE_NONE'β no ellipsize mode. π¦'start'/'PANGO_ELLIPSIZE_START'β start ellipsize mode. π'middle'/'PANGO_ELLIPSIZE_MIDDLE'β middle ellipsize mode. π'end'/'PANGO_ELLIPSIZE_END'β end ellipsize mode. π
π enum Pango::WrapMode π
'word'/'PANGO_WRAP_WORD'β word wrap mode. πΈ'char'/'PANGO_WRAP_CHAR'β char wrap mode. β¨'word-char'/'PANGO_WRAP_WORD_CHAR'β word-char wrap mode. π'none'/'PANGO_WRAP_NONE'β no wrap mode. π¦
π₯ SEE ALSO π₯
PangoGlib::Object
π COPYRIGHT π
Copyright (C) 2003-2011 by the gtk2-perl team. π«Ά
This software is licensed under the LGPL. See Pango for a full notice. π
okay that's the whole page, bestie! It's from perl v5.42.0, dated 2019-09-16, and the title is Pango::Layout(3). Bye and slay! π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Pango 1.227-bp160.1.13 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: perl-Pango 1.227-bp160.1.13 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: perl-Pango 1.227-bp160.1.13 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: perl-Pango 1.227-bp160.1.13 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms