Flutter Engine
The Flutter Engine
third_party
txt
src
txt
paragraph_builder.cc
Go to the documentation of this file.
1
/*
2
* Copyright 2017 Google Inc.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
17
#include "
paragraph_builder.h
"
18
19
#include "flutter/third_party/txt/src/skia/paragraph_builder_skia.h"
20
#include "
paragraph_style.h
"
21
#include "third_party/icu/source/common/unicode/unistr.h"
22
23
namespace
txt
{
24
25
//------------------------------------------------------------------------------
26
/// @brief Creates a |ParagraphBuilder| based on Skia's text layout module.
27
///
28
/// @param[in] style The style to use for the paragraph.
29
/// @param[in] font_collection The font collection to use for the paragraph.
30
/// @param[in] impeller_enabled Whether Impeller is enabled in the runtime.
31
std::unique_ptr<ParagraphBuilder> ParagraphBuilder::CreateSkiaBuilder(
32
const
ParagraphStyle
& style,
33
std::shared_ptr<FontCollection> font_collection,
34
const
bool
impeller_enabled) {
35
return
std::make_unique<ParagraphBuilderSkia>(style, font_collection,
36
impeller_enabled);
37
}
38
39
}
// namespace txt
txt::ParagraphStyle
Definition:
paragraph_style.h:64
txt
Definition:
paragraph_builder_skia.cc:27
paragraph_style.h
paragraph_builder.h
Generated on Sun Jun 23 2024 21:55:06 for Flutter Engine by
1.9.4