openharmony 鸿蒙 capi-drawing-oh-drawing-linemetrics

2026-08-25 浏览 (1)

OH_Drawing_LineMetrics

typedef struct OH_Drawing_LineMetrics {...} OH_Drawing_LineMetrics

Overview

This struct describes the measurement information about a line of text.

Since: 12

Related module: Drawing

Header file: drawing_text_typography.h

Summary

Member Variables

NameDescription
double ascenderHeight of a character above the baseline, after taking the absolute value.
double descenderHeight of a character below the baseline, after taking the absolute value.
double capHeightHeight of an uppercase letter above the baseline.
double xHeightHeight of a lowercase letter, specifically the lowercase x, not including ascenders and descenders.
double widthHorizontal space taken up by a character.
double heightLine height.
double xDistance 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.
double yHeight 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.
size_t startIndexIndex of the first character in the line.
size_t endIndexIndex of the last character in the line.
OH_Drawing_Font_Metrics firstCharMetricsMeasurement information of the first character.

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 capi-drawing-gpu-context-h

openharmony 鸿蒙 capi-drawing-nativepixelmap-

openharmony 鸿蒙 capi-nativevsync-oh-nativevsync-expectedraterange

openharmony 鸿蒙 capi-drawing-oh-drawing-brush

openharmony 鸿蒙 capi-drawing-oh-drawing-image-info

openharmony 鸿蒙 capi-drawing-text-linetypography-h

openharmony 鸿蒙 capi-oh-nativeimage-oh-nativeimage

openharmony 鸿蒙 capi-drawing-typeface-h

openharmony 鸿蒙 capi-drawing-brush-h

openharmony 鸿蒙 capi-nativewindow

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/uypBAQ1J