Flutter Engine
The Flutter Engine
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Functions
TextBlob_serialize_2.cpp File Reference
#include "tools/fiddle/examples.h"
#include "include/core/SkSerialProcs.h"

Go to the source code of this file.

Functions

 REG_FIDDLE (TextBlob_serialize_2, 256, 24, false, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( TextBlob_serialize_2  ,
256  ,
24  ,
false  ,
 
)

Definition at line 4 of file TextBlob_serialize_2.cpp.

4 {
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
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