Flutter Engine
The Flutter Engine
Classes | Functions
strokerect_anisotropic.cpp File Reference
#include "gm/gm.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkPath.h"

Go to the source code of this file.

Classes

class  StrokeRectAnisotropicGM
 

Functions

static void draw_sqooshed_rect (SkCanvas *canvas, SkVector xlate, const SkPaint &p)
 

Function Documentation

◆ draw_sqooshed_rect()

static void draw_sqooshed_rect ( SkCanvas canvas,
SkVector  xlate,
const SkPaint p 
)
static

Definition at line 12 of file strokerect_anisotropic.cpp.

12 {
13 canvas->save();
14 canvas->translate(xlate.fX, xlate.fY);
15 canvas->scale(0.03f, 2.0f);
16 canvas->drawRect(SkRect::MakeLTRB(-500, -10, 500, 10), p);
17 canvas->restore();
18}
void drawRect(const SkRect &rect, const SkPaint &paint)
Definition: SkCanvas.cpp:1673
void restore()
Definition: SkCanvas.cpp:461
void translate(SkScalar dx, SkScalar dy)
Definition: SkCanvas.cpp:1278
int save()
Definition: SkCanvas.cpp:447
void scale(SkScalar sx, SkScalar sy)
Definition: SkCanvas.cpp:1289
float fX
x-axis value
Definition: SkPoint_impl.h:164
float fY
y-axis value
Definition: SkPoint_impl.h:165
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)
Definition: SkRect.h:646