Flutter Engine
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
15
namespace
flutter
{
16
namespace
testing {
17
18
struct
TextRenderOptions
{
19
bool
stroke
=
false
;
20
DlScalar
font_size
= 50;
21
DlColor
color
=
DlColor::kYellow
();
22
std::shared_ptr<DlMaskFilter>
mask_filter
;
23
bool
is_subpixel
=
false
;
24
};
25
26
bool
RenderTextInCanvasSkia
(
DlCanvas
* canvas,
27
const
std::string&
text
,
28
const
std::string_view& font_fixture,
29
DlPoint
position,
30
const
TextRenderOptions
& options = {});
31
32
}
// namespace testing
33
}
// namespace flutter
34
35
#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
bool 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:18
flutter::testing::TextRenderOptions::is_subpixel
bool is_subpixel
Definition
render_text_in_canvas.h:23
flutter::testing::TextRenderOptions::mask_filter
std::shared_ptr< DlMaskFilter > mask_filter
Definition
render_text_in_canvas.h:22
flutter::testing::TextRenderOptions::stroke
bool stroke
Definition
render_text_in_canvas.h:19
flutter::testing::TextRenderOptions::color
DlColor color
Definition
render_text_in_canvas.h:21
flutter::testing::TextRenderOptions::font_size
DlScalar font_size
Definition
render_text_in_canvas.h:20
impeller::TPoint< Scalar >
text_frame_skia.h
impeller
display_list
testing
render_text_in_canvas.h
Generated on Wed Nov 5 2025 21:33:12 for Flutter Engine by
1.9.8