#[repr(C)]pub struct OH_Drawing_LineMetrics {
pub ascender: f64,
pub descender: f64,
pub capHeight: f64,
pub xHeight: f64,
pub width: f64,
pub height: f64,
pub x: f64,
pub y: f64,
pub startIndex: usize,
pub endIndex: usize,
pub firstCharMetrics: OH_Drawing_Font_Metrics,
}Expand description
@brief This struct describes the measurement information about a line of text.
@since 12 @version 1.0
Fields§
§ascender: f64Height of a character above the baseline, after taking the absolute value.
descender: f64Height of a character below the baseline, after taking the absolute value.
capHeight: f64Height of an uppercase letter above the baseline.
xHeight: f64Height of a lowercase letter, specifically the lowercase x, not including ascenders and descenders.
width: f64Horizontal space taken up by a character.
height: f64Line height.
x: f64Distance from the left edge of the leftmost character to the left edge of the container. For left alignment, the value is 0. For right alignment, the value is the container width minus the text width.
y: f64Height from the top edge of the character to the top of the container. The first line is 0, and the second line is the height of the first line.
startIndex: usizeIndex of the first character in the line.
endIndex: usizeIndex of the last character in the line.
firstCharMetrics: OH_Drawing_Font_MetricsMeasurement information of the first character.