From 58de756ef14e4403cced21fc10d6673542fdb30a Mon Sep 17 00:00:00 2001 From: yaoyuchi Date: Tue, 22 Feb 2022 19:50:10 +0800 Subject: [PATCH] canvas text height Signed-off-by: yaoyuchi --- api/@internal/component/ets/canvas.d.ts | 6 ++++++ api/common/@internal/viewmodel.d.ts | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/api/@internal/component/ets/canvas.d.ts b/api/@internal/component/ets/canvas.d.ts index 2a48de5d00..9b400a0c73 100644 --- a/api/@internal/component/ets/canvas.d.ts +++ b/api/@internal/component/ets/canvas.d.ts @@ -348,6 +348,12 @@ declare interface TextMetrics { * @since 8 */ readonly width: number; + + /** + * Indicates the height of a character string. The value is of the double type. + * @since 8 + */ + readonly height: number; } /** diff --git a/api/common/@internal/viewmodel.d.ts b/api/common/@internal/viewmodel.d.ts index 8f088097da..149e18bb6e 100644 --- a/api/common/@internal/viewmodel.d.ts +++ b/api/common/@internal/viewmodel.d.ts @@ -1022,6 +1022,10 @@ export interface TextMetrics { * @devices tv, phone, tablet, wearable */ width: number; + /** + * @devices tv, phone, tablet, wearable + */ + height: number; } /** -- Gitee