Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 100db12

Browse files
canvaskit binding
1 parent b09fe04 commit 100db12

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/web_ui/lib/src/engine/canvaskit/canvaskit_api.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3200,7 +3200,7 @@ class SkGlyphClusterInfo {}
32003200

32013201
extension SkGlyphClusterInfoExtension on SkGlyphClusterInfo {
32023202
@JS('graphemeLayoutBounds')
3203-
external JSFloat32Array get _bounds;
3203+
external JSArray get _bounds;
32043204

32053205
@JS('dir')
32063206
external SkTextDirection get _direction;
@@ -3209,7 +3209,9 @@ extension SkGlyphClusterInfoExtension on SkGlyphClusterInfo {
32093209
external SkTextRange get _textRange;
32103210

32113211
ui.GlyphInfo get _glyphInfo {
3212-
final ui.Rect bounds = fromSkRect(_bounds.toDart);
3212+
print(_bounds.toDart[0].runtimeType);
3213+
final List<num> list = _bounds.toDart.cast<num>();
3214+
final ui.Rect bounds = ui.Rect.fromLTRB(list[0].toDouble(), list[1].toDouble(), list[2].toDouble(), list[3].toDouble());
32133215
final ui.TextRange textRange = ui.TextRange(start: _textRange.start.toInt(), end: _textRange.end.toInt());
32143216
return ui.GlyphInfo(bounds, textRange, ui.TextDirection.values[_direction.value.toInt()]);
32153217
}

0 commit comments

Comments
 (0)