[pango/bilelmoussaoui/gi-annotations] Flesh out some doc comments
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/bilelmoussaoui/gi-annotations] Flesh out some doc comments
- Date: Fri, 29 Oct 2021 12:05:34 +0000 (UTC)
commit 46fc53896c67eaca25da0876ea7ee8160410fdd8
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Oct 29 08:05:07 2021 -0400
Flesh out some doc comments
Add some missing details about new enumerations
and run baselines.
pango/pango-attributes.h | 9 +++++++--
pango/pango-layout.c | 10 +++++++++-
2 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/pango/pango-attributes.h b/pango/pango-attributes.h
index 982987f8..51b9b077 100644
--- a/pango/pango-attributes.h
+++ b/pango/pango-attributes.h
@@ -232,6 +232,7 @@ typedef enum {
/**
* PangoBaselineShift:
+ * @PANGO_BASELINE_SHIFT_NONE: Leave the baseline unchanged
* @PANGO_BASELINE_SHIFT_SUPERSCRIPT: Shift the baseline to the superscript position,
* relative to the previous run
* @PANGO_BASELINE_SHIFT_SUBSCRIPT: Shift the baseline to the subscript position,
@@ -249,8 +250,12 @@ typedef enum {
/**
* PangoFontScale:
- * @PANGO_FONT_SCALE_SUPERSCRIPT:
- * @PANGO_FONT_SCALE_SUBSCRIPT:
+ * @PANGO_FONT_SCALE_NONE: Leave the font size unchanged
+ * @PANGO_FONT_SCALE_SUPERSCRIPT: Change the font to a size suitable for superscripts
+ * @PANGO_FONT_SCALE_SUBSCRIPT: Change the font to a size suitable for subscripts
+ *
+ * An enumeration that affects font sizes for superscript
+ * and subscript positioning.
*
* Since: 1.50
*/
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index f91b91d3..ba81adf6 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -7510,9 +7510,17 @@ pango_layout_iter_get_baseline (PangoLayoutIter *iter)
}
/**
- * pango_layout_iter_get_run_baseline
+ * pango_layout_iter_get_run_baseline:
* @iter: a `PangoLayoutIter`
*
+ * Gets the Y position of the current run's baseline, in layout
+ * coordinates.
+ *
+ * Layout coordinates have the origin at the top left of the entire layout.
+ *
+ * The run baseline can be different from the line baseline, for
+ * example due to superscript or subscript positioning.
+ *
* Since: 1.50
*/
int
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]