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
14#include "third_party/abseil-cpp/absl/status/statusor.h"
15
16namespace flutter {
17namespace testing {
18
20 bool stroke = false;
23 std::shared_ptr<DlMaskFilter> mask_filter;
24 bool is_subpixel = false;
25};
26
27absl::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_
Developer-facing API for rendering anything within the engine.
Definition dl_canvas.h:32
std::u16string text
absl::StatusOr< DlRect > RenderTextInCanvasSkia(DlCanvas *canvas, const std::string &text, const std::string_view &font_fixture, DlPoint position, const TextRenderOptions &options)
impeller::Scalar DlScalar
static constexpr DlColor kYellow()
Definition dl_color.h:76
std::shared_ptr< DlMaskFilter > mask_filter