---
name: "Pango::Layout"
section: "3pm"
platform: "linux"
package: "pango-perl"
version: "1.227-20"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/Pango::Layout"
---

# Pango::Layout(3pm)

wrapper for PangoLayout

## NAME

Pango::Layout - wrapper for PangoLayout

## HIERARCHY

```
  Glib::Object
  +----Pango::Layout
```

## METHODS

### layout = Pango::Layout-\>new ($context)

- •

  `$context` (Pango::Context)

### alignment = $layout-\>get\_alignment

### $layout-\>set\_alignment ($alignment)

- •

  `$alignment` (Pango::Alignment)

### attrlist or undef = $layout-\>get\_attributes

### $layout-\>set\_attributes ($attrs)

- •

  `$attrs` (Pango::AttrList or undef)

### boolean = $layout-\>get\_auto\_dir

Since: pango 1.4

### $layout-\>set\_auto\_dir ($auto\_dir)

- •

  `$auto_dir` (boolean)

Since: pango 1.4

### integer = $layout-\>get\_baseline

Since: pango 1.22

### $layout-\>context\_changed

### context = $layout-\>get\_context

### layout = $src-\>copy

### (strong\_pos, weak\_pos) = $layout-\>get\_cursor\_pos ($index)

- •

  `$index_` (integer)

### ellipsizemode = $layout-\>get\_ellipsize

Since: pango 1.6

### $layout-\>set\_ellipsize ($ellipsize)

- •

  `$ellipsize` (Pango::EllipsizeMode)

Since: pango 1.6

### (ink\_rect, logical\_rect) = $layout-\>get\_extents

### (ink\_rect, logical\_rect) = $layout-\>get\_pixel\_extents

### fontdescription or undef = $layout-\>get\_font\_description

Since: pango 1.8

### $layout-\>set\_font\_description ($desc)

- •

  `$desc` (Pango::FontDescription or undef)

### integer = $layout-\>get\_height

Since: pango 1.20

### $layout-\>set\_height ($height)

- •

  `$height` (integer)

Since: pango 1.20

### integer = $layout-\>get\_indent

### $layout-\>set\_indent ($newval)

- •

  `$newval` (integer)

### array reference = $layout-\>index\_to\_pos ($index\_)

- •

  `$index_` (integer)

### boolean = $layout-\>is\_ellipsized

Since: pango 1.16

### boolean = $layout-\>is\_wrapped

Since: pango 1.16

### layoutiter = $layout-\>get\_iter

### integer = $layout-\>get\_justify

### $layout-\>set\_justify ($newval)

- •

  `$newval` (integer)

### integer = $layout-\>get\_line\_count

### layoutline or undef = $layout-\>get\_line ($line)

- •

  `$line` (integer)

### layoutline or undef = $layout-\>get\_line\_readonly ($line)

- •

  `$line` (integer)

Since: pango 1.16

### list = $layout-\>get\_lines

### list = $layout-\>get\_lines\_readonly

Since: pango 1.16

### list = $layout-\>get\_log\_attrs

Returns a list of Pango::LogAttr's

### $layout-\>set\_markup ($markup)

- •

  `$markup` (string)

### accel\_char = $layout-\>set\_markup\_with\_accel ($markup, $accel\_marker)

- •

  `$markup` (string)

- •

  `$accel_marker` (character)

### (new\_index, new\_trailing) = $layout-\>move\_cursor\_visually ($strong, $old\_index, $old\_trailing, $direction)

- •

  `$strong` (boolean)

- •

  `$old_index` (integer)

- •

  `$old_trailing` (integer)

- •

  `$direction` (integer)

### list = $layout-\>get\_pixel\_extents

### (width, height) = $layout-\>get\_pixel\_size

### integer = $layout-\>get\_single\_paragraph\_mode

### $layout-\>set\_single\_paragraph\_mode ($newval)

- •

  `$newval` (integer)

### (width, height) = $layout-\>get\_size

### integer = $layout-\>get\_spacing

### $layout-\>set\_spacing ($newval)

- •

  `$newval` (integer)

### tabarray or undef = $layout-\>get\_tabs

### $layout-\>set\_tabs ($tabs)

- •

  `$tabs` (Pango::TabArray or undef)

### string = $layout-\>get\_text

### $layout-\>set\_text ($text)

- •

  `$text` (string)

### integer = $layout-\>get\_unknown\_glyphs\_count

Since: pango 1.16

### integer = $layout-\>get\_width

### $layout-\>set\_width ($newval)

- •

  `$newval` (integer)

### wrapmode = $layout-\>get\_wrap

### $layout-\>set\_wrap ($wrap)

- •

  `$wrap` (Pango::WrapMode)

### (index, trailing) = $layout-\>xy\_to\_index ($x, $y)

- •

  `$x` (integer)

- •

  `$y` (integer)

## ENUMS AND FLAGS

### enum Pango::Alignment

- •

  'left' / 'PANGO\_ALIGN\_LEFT'

- •

  'center' / 'PANGO\_ALIGN\_CENTER'

- •

  'right' / 'PANGO\_ALIGN\_RIGHT'

### enum Pango::EllipsizeMode

- •

  'none' / 'PANGO\_ELLIPSIZE\_NONE'

- •

  'start' / 'PANGO\_ELLIPSIZE\_START'

- •

  'middle' / 'PANGO\_ELLIPSIZE\_MIDDLE'

- •

  'end' / 'PANGO\_ELLIPSIZE\_END'

### enum Pango::WrapMode

- •

  'word' / 'PANGO\_WRAP\_WORD'

- •

  'char' / 'PANGO\_WRAP\_CHAR'

- •

  'word-char' / 'PANGO\_WRAP\_WORD\_CHAR'

- •

  'none' / 'PANGO\_WRAP\_NONE'

## SEE ALSO

Pango, Glib::Object

## COPYRIGHT

Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL.  See Pango for a full notice.
