Flutter Engine
The Flutter Engine
SkTextUtils.h
Go to the documentation of this file.
1/*
2 * Copyright 2018 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef SkTextUtils_DEFINED
9#define SkTextUtils_DEFINED
10
14
15#include <cstddef>
16#include <cstring>
17
18class SkCanvas;
19class SkFont;
20class SkPaint;
21class SkPath;
22
24public:
25 enum Align {
29 };
30
31 static void Draw(SkCanvas*, const void* text, size_t size, SkTextEncoding,
32 SkScalar x, SkScalar y, const SkFont&, const SkPaint&, Align = kLeft_Align);
33
34 static void DrawString(SkCanvas* canvas, const char text[], SkScalar x, SkScalar y,
35 const SkFont& font, const SkPaint& paint, Align align = kLeft_Align) {
36 Draw(canvas, text, strlen(text), SkTextEncoding::kUTF8, x, y, font, paint, align);
37 }
38
39 static void GetPath(const void* text, size_t length, SkTextEncoding, SkScalar x, SkScalar y,
40 const SkFont&, SkPath*);
41};
42
43#endif
Align
@ kLeft_Align
#define SK_API
Definition: SkAPI.h:35
SkTextEncoding
Definition: SkFontTypes.h:11
@ kUTF8
uses bytes to represent UTF-8 or ASCII
Definition: SkFont.h:35
Definition: SkPath.h:59
static void DrawString(SkCanvas *canvas, const char text[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint, Align align=kLeft_Align)
Definition: SkTextUtils.h:34
static void Draw(SkCanvas *canvas, const SkRect &rect)
const Paint & paint
Definition: color_source.cc:38
float SkScalar
Definition: extension.cpp:12
size_t length
std::u16string text
double y
double x
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259
font
Font Metadata and Metrics.