Flutter Engine
The Flutter Engine
SkBidiFactory_icu_full.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
10
11#include <unicode/ubidi.h>
12#include <unicode/umachine.h>
13#include <unicode/utypes.h>
14
15const char* SkBidiICUFactory::errorName(UErrorCode status) const {
16 return SkGetICULib()->f_u_errorName(status);
17}
18
20 return SkGetICULib()->f_ubidi_close;
21}
22
23UBiDiDirection SkBidiICUFactory::bidi_getDirection(const UBiDi* bidi) const {
24 return SkGetICULib()->f_ubidi_getDirection(bidi);
25}
26
28 return SkGetICULib()->f_ubidi_getLength(bidi);
29}
30
32 return SkGetICULib()->f_ubidi_getLevelAt(bidi, pos);
33}
34
35UBiDi* SkBidiICUFactory::bidi_openSized(int32_t maxLength,
36 int32_t maxRunCount,
37 UErrorCode* pErrorCode) const {
38 return SkGetICULib()->f_ubidi_openSized(maxLength, maxRunCount, pErrorCode);
39}
40
42 const UChar* text,
43 int32_t length,
44 UBiDiLevel paraLevel,
45 UBiDiLevel* embeddingLevels,
46 UErrorCode* status) const {
47 return SkGetICULib()->f_ubidi_setPara(bidi, text, length, paraLevel, embeddingLevels, status);
48}
49
51 int levelsCount,
52 int32_t logicalFromVisual[]) const {
53 SkGetICULib()->f_ubidi_reorderVisual(runLevels, levelsCount, logicalFromVisual);
54}
SkPoint pos
const SkICULib * SkGetICULib()
void(*)(UBiDi *bidi) BidiCloseCallback
const char * errorName(UErrorCode status) const override
UBiDiDirection bidi_getDirection(const UBiDi *bidi) const override
SkBidiIterator::Position bidi_getLength(const UBiDi *bidi) const override
SkBidiFactory::BidiCloseCallback bidi_close_callback() const override
void bidi_reorderVisual(const SkUnicode::BidiLevel runLevels[], int levelsCount, int32_t logicalFromVisual[]) const override
UBiDi * bidi_openSized(int32_t maxLength, int32_t maxRunCount, UErrorCode *pErrorCode) const override
SkBidiIterator::Level bidi_getLevelAt(const UBiDi *bidi, int pos) const override
void bidi_setPara(UBiDi *bidi, const UChar *text, int32_t length, UBiDiLevel paraLevel, UBiDiLevel *embeddingLevels, UErrorCode *status) const override
int32_t Position
Definition: SkUnicode.h:45
uint8_t Level
Definition: SkUnicode.h:46
uint8_t BidiLevel
Definition: SkUnicode.h:99
size_t length
std::u16string text