Flutter Engine
The Flutter Engine
TextBlob_serialize_2.cpp
Go to the documentation of this file.
1// Copyright 2019 Google LLC.
2// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
4REG_FIDDLE(TextBlob_serialize_2, 256, 24, false, 0) {
6
7void draw(SkCanvas* canvas) {
8 SkFont blobFont;
9 blobFont.setSize(24);
10 sk_sp<SkTextBlob> blob = SkTextBlob::MakeFromText("Hello World", 11, blobFont);
13 canvas->drawTextBlob(copy, 20, 20, SkPaint());
14}
15} // END FIDDLE
REG_FIDDLE(TextBlob_serialize_2, 256, 24, false, 0)
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
void drawTextBlob(const SkTextBlob *blob, SkScalar x, SkScalar y, const SkPaint &paint)
Definition: SkCanvas.cpp:2484
Definition: SkFont.h:35
void setSize(SkScalar textSize)
Definition: SkFont.cpp:129
static sk_sp< SkTextBlob > MakeFromText(const void *text, size_t byteLength, const SkFont &font, SkTextEncoding encoding=SkTextEncoding::kUTF8)
Definition: SkTextBlob.cpp:788
static sk_sp< SkTextBlob > Deserialize(const void *data, size_t size, const SkDeserialProcs &procs)
Definition: SkTextBlob.cpp:855
size_t serialize(const SkSerialProcs &procs, void *memory, size_t memory_size) const
Definition: SkTextBlob.cpp:864
Definition: copy.py:1
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:63