Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Paint_setARGB.cpp
Go to the documentation of this file.
1// Copyright 2019 Google LLC.
2// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
4// HASH=cb62e4755789ed32f7120dc55984959d
5REG_FIDDLE(Paint_setARGB, 256, 256, true, 0) {
6void draw(SkCanvas* canvas) {
7 SkPaint transRed1, transRed2;
8 transRed1.setARGB(255 / 2, 255, 0, 0);
9 transRed2.setColor(SkColorSetARGB(255 / 2, 255, 0, 0));
10 SkDebugf("transRed1 %c= transRed2", transRed1 == transRed2 ? '=' : '!');
11}
12} // END FIDDLE
static constexpr SkColor SkColorSetARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
Definition SkColor.h:49
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition aaclip.cpp:27
void setColor(SkColor color)
Definition SkPaint.cpp:119
void setARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
Definition SkPaint.cpp:134
#define REG_FIDDLE(NAME, W, H, TEXT, I)
Definition examples.h:60