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

Go to the source code of this file.

Functions

 REG_FIDDLE (Multiply, 256, 256, false, 5)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( Multiply  ,
256  ,
256  ,
false  ,
 
)

Definition at line 4 of file Multiply.cpp.

4 {
5void draw(SkCanvas* canvas) {
6 canvas->drawImage(image, 0, 0);
7 canvas->drawImage(image, 128, 0);
8 canvas->drawImage(image, 0, 128);
9 canvas->drawImage(image, 128, 128);
11 paint.setBlendMode(SkBlendMode::kDstATop);
13 SkPoint vert[] = { { 0, 0 }, { 0, 256 } };
14 paint.setShader(SkGradientShader::MakeLinear(vert, alphas, nullptr, std::size(alphas),
16 canvas->drawPaint(paint);
17 canvas->clipRect( { 30, 30, 226, 226 } );
18 canvas->drawColor(0x80bb9977, SkBlendMode::kMultiply);
19}
20} // END FIDDLE
@ kMultiply
r = s*(1-da) + d*(1-sa) + s*d
@ kDstATop
r = d*sa + s*(1-da)
uint32_t SkColor
Definition: SkColor.h:37
constexpr SkColor SK_ColorTRANSPARENT
Definition: SkColor.h:99
constexpr SkColor SK_ColorBLACK
Definition: SkColor.h:103
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
Definition: SkCanvas.cpp:1361
void drawColor(SkColor color, SkBlendMode mode=SkBlendMode::kSrcOver)
Definition: SkCanvas.h:1182
void drawPaint(const SkPaint &paint)
Definition: SkCanvas.cpp:1668
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
Definition: SkCanvas.h:1528
static sk_sp< SkShader > MakeLinear(const SkPoint pts[2], const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
const Paint & paint
Definition: color_source.cc:38
sk_sp< const SkImage > image
Definition: SkRecords.h:269
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259