Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
Loading...
Searching...
No Matches
render_text_in_canvas.h
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#ifndef FLUTTER_IMPELLER_DISPLAY_LIST_TESTING_RENDER_TEXT_IN_CANVAS_H_
6
#define FLUTTER_IMPELLER_DISPLAY_LIST_TESTING_RENDER_TEXT_IN_CANVAS_H_
7
8
#include <memory>
9
10
#include "
flutter/display_list/dl_canvas.h
"
11
#include "
flutter/display_list/dl_color.h
"
12
#include "
flutter/display_list/effects/dl_mask_filter.h
"
13
#include "
impeller/typographer/backends/skia/text_frame_skia.h
"
14
#include "third_party/abseil-cpp/absl/status/statusor.h"
15
16
namespace
flutter
{
17
namespace
testing {
18
19
struct
TextRenderOptions
{
20
bool
stroke
=
false
;
21
DlScalar
font_size
= 50;
22
DlColor
color
=
DlColor::kYellow
();
23
std::shared_ptr<DlMaskFilter>
mask_filter
;
24
bool
is_subpixel
=
false
;
25
};
26
27
absl::StatusOr<DlRect>
RenderTextInCanvasSkia
(
28
DlCanvas
* canvas,
29
const
std::string&
text
,
30
const
std::string_view& font_fixture,
31
DlPoint
position,
32
const
TextRenderOptions
& options = {});
33
34
}
// namespace testing
35
}
// namespace flutter
36
37
#endif
// FLUTTER_IMPELLER_DISPLAY_LIST_TESTING_RENDER_TEXT_IN_CANVAS_H_
flutter::DlCanvas
Developer-facing API for rendering anything within the engine.
Definition
dl_canvas.h:32
dl_canvas.h
dl_color.h
dl_mask_filter.h
text
std::u16string text
Definition
keyboard_unittests.cc:332
flutter::testing::RenderTextInCanvasSkia
absl::StatusOr< DlRect > RenderTextInCanvasSkia(DlCanvas *canvas, const std::string &text, const std::string_view &font_fixture, DlPoint position, const TextRenderOptions &options)
Definition
render_text_in_canvas.cc:14
flutter
Definition
asset_manager.cc:10
flutter::DlScalar
impeller::Scalar DlScalar
Definition
dl_geometry_types.h:17
flutter::DlColor
Definition
dl_color.h:21
flutter::DlColor::kYellow
static constexpr DlColor kYellow()
Definition
dl_color.h:76
flutter::testing::TextRenderOptions
Definition
render_text_in_canvas.h:19
flutter::testing::TextRenderOptions::is_subpixel
bool is_subpixel
Definition
render_text_in_canvas.h:24
flutter::testing::TextRenderOptions::mask_filter
std::shared_ptr< DlMaskFilter > mask_filter
Definition
render_text_in_canvas.h:23
flutter::testing::TextRenderOptions::stroke
bool stroke
Definition
render_text_in_canvas.h:20
flutter::testing::TextRenderOptions::color
DlColor color
Definition
render_text_in_canvas.h:22
flutter::testing::TextRenderOptions::font_size
DlScalar font_size
Definition
render_text_in_canvas.h:21
impeller::TPoint< Scalar >
text_frame_skia.h
impeller
display_list
testing
render_text_in_canvas.h
Generated on Fri Jul 24 2026 07:12:33 for Flutter Engine Uber Docs by
1.9.8