Package ch.bailu.gtk.pango
Klasse LayoutLine
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Record
ch.bailu.gtk.pango.LayoutLine
- Alle implementierten Schnittstellen:
PointerInterface
A `PangoLayoutLine` represents one of the lines resulting from laying
out a paragraph via `PangoLayout`.
`PangoLayoutLine` structures are obtained by calling
[method@Pango.Layout.get_line] and are only valid until the text,
attributes, or settings of the parent `PangoLayout` are modified.
out a paragraph via `PangoLayout`.
`PangoLayoutLine` structures are obtained by calling
[method@Pango.Layout.get_line] and are only valid until the text,
attributes, or settings of the parent `PangoLayout` are modified.
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final String#TRUE if this is the first line of the paragraphstatic final Stringthe layout this line belongs to, might be %NULLstatic final Stringlength of line in bytesstatic final String#Resolved PangoDirection of linestatic final Stringlist of runs in the
line, from left to rightstatic final Stringstart of line as byte index into layout->text -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic ClassHandlervoidgetExtents(Rectangle ink_rect, Rectangle logical_rect) Computes the logical and ink extents of a layout line.int#TRUE if this is the first line of the paragraphthe layout this line belongs to, might be %NULLintlength of line in bytesint#Resolved PangoDirection of linelist of runs in the
line, from left to rightintstart of line as byte index into layout->textvoidComputes the height of the line, as the maximum of the heights
of fonts used in this line.static intintReturns the length of the line, in bytes.static longstatic TypeSystem.TypeSizevoidgetPixelExtents(Rectangle ink_rect, Rectangle logical_rect) Computes the logical and ink extents of @layout_line in device units.intReturns the resolved direction of the line.intReturns the start index of the line, as byte index
into the text of the layout.static longstatic TypeSystem.TypeSizevoidConverts an index within a line to a X position.booleanReturns whether this is the first line of the paragraph.ref()Increase the reference count of a `PangoLayoutLine` by one.voidsetFieldIsParagraphStart(int is_paragraph_start) #TRUE if this is the first line of the paragraphvoidsetFieldLayout(Layout layout) the layout this line belongs to, might be %NULLvoidsetFieldLength(int length) length of line in bytesvoidsetFieldResolvedDir(int resolved_dir) #Resolved PangoDirection of linevoidsetFieldRuns(SList runs) list of runs in the
line, from left to rightvoidsetFieldStartIndex(int start_index) start of line as byte index into layout->textvoidunref()Decrease the reference count of a `PangoLayoutLine` by one.booleanConverts from x offset to the byte index of the corresponding character
within the text of the layout.Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacksVon Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNullVon Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitVon Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Felddetails
-
LAYOUT
the layout this line belongs to, might be %NULL- Siehe auch:
-
START_INDEX
start of line as byte index into layout->text- Siehe auch:
-
LENGTH
length of line in bytes- Siehe auch:
-
RUNS
list of runs in the
line, from left to right- Siehe auch:
-
IS_PARAGRAPH_START
#TRUE if this is the first line of the paragraph- Siehe auch:
-
RESOLVED_DIR
#Resolved PangoDirection of line- Siehe auch:
-
-
Konstruktordetails
-
LayoutLine
-
LayoutLine
public LayoutLine()
-
-
Methodendetails
-
getClassHandler
-
setFieldLayout
the layout this line belongs to, might be %NULL -
getFieldLayout
the layout this line belongs to, might be %NULL -
setFieldStartIndex
public void setFieldStartIndex(int start_index) start of line as byte index into layout->text -
getFieldStartIndex
public int getFieldStartIndex()start of line as byte index into layout->text -
setFieldLength
public void setFieldLength(int length) length of line in bytes -
getFieldLength
public int getFieldLength()length of line in bytes -
setFieldRuns
list of runs in the
line, from left to right -
getFieldRuns
list of runs in the
line, from left to right -
setFieldIsParagraphStart
public void setFieldIsParagraphStart(int is_paragraph_start) #TRUE if this is the first line of the paragraph -
getFieldIsParagraphStart
public int getFieldIsParagraphStart()#TRUE if this is the first line of the paragraph -
setFieldResolvedDir
public void setFieldResolvedDir(int resolved_dir) #Resolved PangoDirection of line -
getFieldResolvedDir
public int getFieldResolvedDir()#Resolved PangoDirection of line -
getExtents
Computes the logical and ink extents of a layout line.
See [method@Pango.Font.get_glyph_extents] for details
about the interpretation of the rectangles.- Parameter:
ink_rect- rectangle used to store the extents of the glyph string as drawnlogical_rect- rectangle used to store the logical extents of the glyph string
-
getHeight
Computes the height of the line, as the maximum of the heights
of fonts used in this line.
Note that the actual baseline-to-baseline distance between lines
of text is influenced by other factors, such as
[method@Pango.Layout.set_spacing] and
[method@Pango.Layout.set_line_spacing].- Parameter:
height- return location for the line height
-
getLength
public int getLength()Returns the length of the line, in bytes.- Gibt zurück:
- the length of the line
-
getPixelExtents
Computes the logical and ink extents of @layout_line in device units.
This function just calls [method@Pango.LayoutLine.get_extents] followed by
two [func@extents_to_pixels] calls, rounding @ink_rect and @logical_rect
such that the rounded rectangles fully contain the unrounded one (that is,
passes them as first argument to [func@extents_to_pixels]).- Parameter:
ink_rect- rectangle used to store the extents of the glyph string as drawnlogical_rect- rectangle used to store the logical extents of the glyph string
-
getResolvedDirection
public int getResolvedDirection()Returns the resolved direction of the line.- Gibt zurück:
- the resolved direction of the line
-
getStartIndex
public int getStartIndex()Returns the start index of the line, as byte index
into the text of the layout.- Gibt zurück:
- the start index of the line
-
indexToX
Converts an index within a line to a X position.- Parameter:
index_- byte offset of a grapheme within the layouttrailing- 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 graphemex_pos- location to store the x_offset (in Pango units)
-
isParagraphStart
public boolean isParagraphStart()Returns whether this is the first line of the paragraph.- Gibt zurück:
- %TRUE if this is the first line
-
ref
Increase the reference count of a `PangoLayoutLine` by one.- Gibt zurück:
- the line passed in.
-
unref
public void unref()Decrease the reference count of a `PangoLayoutLine` by one.
If the result is zero, the line and all associated memory
will be freed. -
xToIndex
Converts from x offset to the byte index of the corresponding character
within the text of the layout.
If @x_pos is outside the line, @index_ and @trailing will point to the very
first or very last position in the line. This determination is based on the
resolved direction of the paragraph; for example, if the resolved direction
is right-to-left, then an X position to the right of the line (after it)
results in 0 being stored in @index_ and @trailing. An X position to the
left of the line results in @index_ pointing to the (logical) last grapheme
in the line and @trailing being set to the number of characters in that
grapheme. The reverse is true for a left-to-right line.- Parameter:
x_pos- the X offset (in Pango units) from the left edge of the line.index_- location to store calculated byte index for the grapheme in which the user clickedtrailing- location to store an 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 leading edge of the grapheme.- Gibt zurück:
- %FALSE if @x_pos was outside the line, %TRUE if inside
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-