Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

pangoLayoutXyToIndex

pangoLayoutXyToIndex


Description

Converts from X and Y position within a layout to the byte index to the character at that logical position. If the Y position is not inside the layout, the closest position is chosen (the position will be clamped inside the layout). If the X position is not within the layout, then the start or the end of the line is chosen as described for pangoLayoutXToIndex(). If either the X or Y positions were not inside the layout, then the function returns FALSE; on an exact hit, it returns TRUE.

Usage

pangoLayoutXyToIndex(object, x, y)

Arguments

object

[PangoLayout] a PangoLayout

x

[integer] the X offset (in Pango units) from the left edge of the layout.

y

[integer] the Y offset (in Pango units) from the top edge of the layout

Value

A list containing the following elements:

retval

[logical] TRUE if the coordinates were inside text, FALSE otherwise.

index

[integer] location to store calculated byte index

trailing

[integer] location to store a integer indicating where in the grapheme the user clicked. It will either be zero, or the number of characters in the grapheme. 0 represents the trailing edge of the grapheme.

Author(s)

Derived by RGtkGen from GTK+ documentation


RGtk2

R Bindings for Gtk 2.8.0 and Above

v2.20.36
GPL
Authors
Michael Lawrence <michafla@gene.com> and Duncan Temple Lang <duncan@wald.ucdavis.edu>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.