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

pangoGlyphStringXToIndex

pangoGlyphStringXToIndex


Description

Convert from x offset to character position. Character positions are computed by dividing up each cluster into equal portions. In scripts where positioning within a cluster is not allowed (such as Thai), the returned value may not be a valid cursor position; the caller must combine the result with the logical attributes for the text to compute the valid cursor position.

Usage

pangoGlyphStringXToIndex(object, text, analysis, x.pos)

Arguments

object

[PangoGlyphString] the glyphs returned from pangoShape

text

[char] the text for the run

analysis

[PangoAnalysis] the analysis information return from pangoItemize

x.pos

[integer] the x offset (in Pango units)

Value

A list containing the following elements:

index

[integer] location to store calculated byte index within text

trailing

[integer] location to store a boolean indicating whether the user clicked on the leading or trailing edge of the character.

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.