Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
draw_vertices.cpp File Reference
#include "tools/fiddle/examples.h"

Go to the source code of this file.

Functions

 REG_FIDDLE (draw_vertices, 256, 256, false, 6)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( draw_vertices  ,
256  ,
256  ,
false  ,
 
)

Definition at line 4 of file draw_vertices.cpp.

4 {
5// draw_vertices
6void draw(SkCanvas* canvas) {
8 p.setAntiAlias(true);
9
10 SkPoint pts[3] = {{64, 32}, {0, 224}, {128, 224}};
12 canvas->drawVertices(
15
16 canvas->translate(120, 0);
17
19 SkPoint texs[3] = {{0, 0}, {0, 128}, {64, 256}};
20 canvas->drawVertices(
23}
24} // END FIDDLE
@ kSrcOver
r = s + (1-sa)*d
uint32_t SkColor
Definition SkColor.h:37
constexpr SkColor SK_ColorBLUE
Definition SkColor.h:135
constexpr SkColor SK_ColorRED
Definition SkColor.h:126
constexpr SkColor SK_ColorGREEN
Definition SkColor.h:131
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition aaclip.cpp:27
void translate(SkScalar dx, SkScalar dy)
void drawVertices(const SkVertices *vertices, SkBlendMode mode, const SkPaint &paint)
sk_sp< SkShader > makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
Definition SkImage.cpp:179
static sk_sp< SkVertices > MakeCopy(VertexMode mode, int vertexCount, const SkPoint positions[], const SkPoint texs[], const SkColor colors[], int indexCount, const uint16_t indices[])
@ kTriangles_VertexMode
Definition SkVertices.h:31
sk_sp< SkImage > image
Definition examples.cpp:29
PODArray< SkRect > texs
Definition SkRecords.h:333
PODArray< SkColor > colors
Definition SkRecords.h:276