Flutter Engine
The Flutter Engine
Functions
Canvas_setMatrix.cpp File Reference
#include "tools/fiddle/examples.h"

Go to the source code of this file.

Functions

 REG_FIDDLE (Canvas_setMatrix, 256, 128, false, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( Canvas_setMatrix  ,
256  ,
128  ,
false  ,
 
)

Definition at line 4 of file Canvas_setMatrix.cpp.

4 {
5void draw(SkCanvas* canvas) {
8 canvas->scale(4, 6);
9 canvas->drawString("truth", 2, 10, font, paint);
11 matrix.setScale(2.8f, 6);
12 canvas->setMatrix(matrix);
13 canvas->drawString("consequences", 2, 20, font, paint);
14}
15} // END FIDDLE
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
void setMatrix(const SkM44 &matrix)
Definition: SkCanvas.cpp:1349
void scale(SkScalar sx, SkScalar sy)
Definition: SkCanvas.cpp:1289
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
Definition: SkCanvas.h:1803
sk_sp< SkTypeface > matchFamilyStyle(const char familyName[], const SkFontStyle &) const
Definition: SkFontMgr.cpp:109
Definition: SkFont.h:35
const Paint & paint
Definition: color_source.cc:38
sk_sp< SkFontMgr > fontMgr
Definition: examples.cpp:32
unsigned useCenter Optional< SkMatrix > matrix
Definition: SkRecords.h:258
font
Font Metadata and Metrics.