Flutter Engine
The Flutter Engine
SkBidiFactory_icu_subset.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2024 Google LLC
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
8
9#include <unicode/umachine.h>
10
11const char* SkBidiSubsetFactory::errorName(UErrorCode status) const {
12 return u_errorName_skia(status);
13}
14
16 return ubidi_close_skia;
17}
18
19UBiDiDirection SkBidiSubsetFactory::bidi_getDirection(const UBiDi* bidi) const {
20 return ubidi_getDirection_skia(bidi);
21}
22
24 return ubidi_getLength_skia(bidi);
25}
26
28 return ubidi_getLevelAt_skia(bidi, pos);
29}
30
31UBiDi* SkBidiSubsetFactory::bidi_openSized(int32_t maxLength,
32 int32_t maxRunCount,
33 UErrorCode* pErrorCode) const {
34 return ubidi_openSized_skia(maxLength, maxRunCount, pErrorCode);
35}
36
38 const UChar* text,
39 int32_t length,
40 UBiDiLevel paraLevel,
41 UBiDiLevel* embeddingLevels,
42 UErrorCode* status) const {
43 return ubidi_setPara_skia(bidi, text, length, paraLevel, embeddingLevels, status);
44}
45
47 int levelsCount,
48 int32_t logicalFromVisual[]) const {
49 ubidi_reorderVisual_skia(runLevels, levelsCount, logicalFromVisual);
50}
SkPoint pos
void(*)(UBiDi *bidi) BidiCloseCallback
int32_t Position
Definition: SkUnicode.h:45
uint8_t Level
Definition: SkUnicode.h:46
UBiDi * bidi_openSized(int32_t maxLength, int32_t maxRunCount, UErrorCode *pErrorCode) const override
SkBidiFactory::BidiCloseCallback bidi_close_callback() const override
const char * errorName(UErrorCode status) const override
void bidi_reorderVisual(const SkUnicode::BidiLevel runLevels[], int levelsCount, int32_t logicalFromVisual[]) const override
SkBidiIterator::Position bidi_getLength(const UBiDi *bidi) const override
UBiDiDirection bidi_getDirection(const UBiDi *bidi) const override
void bidi_setPara(UBiDi *bidi, const UChar *text, int32_t length, UBiDiLevel paraLevel, UBiDiLevel *embeddingLevels, UErrorCode *status) const override
SkBidiIterator::Level bidi_getLevelAt(const UBiDi *bidi, int pos) const override
uint8_t BidiLevel
Definition: SkUnicode.h:99
size_t length
std::u16string text