### Method

# Pango Layoutindex_to_line_x

#### Declaration [src]

    void
    pango_layout_index_to_line_x (
      PangoLayout* layout,
      int index_,
      gboolean trailing,
      int* line,
      int* x_pos
    )

#### Description [src]

Converts from byte `index_` within the `layout` to line and X position.

The X position is measured from the left edge of the line.

#### Parameters

`index_`

  Type: `int`

  The byte index of a grapheme within the layout.

`trailing`

  Type: `gboolean`

  An integer indicating the edge of the grapheme to retrieve the position of. If > 0, the trailing edge of the grapheme, if 0, the leading of the grapheme.

`line`

  Type: `int*`

  Location to store resulting line index. (which will between 0 and pango_layout_get_line_count(layout) - 1)

  The argument will be set by the function.
  The argument can be `NULL`.

`x_pos`

  Type: `int*`

  Location to store resulting position within line (`PANGO_SCALE` units per device unit)

  The argument will be set by the function.
  The argument can be `NULL`.