Flutter Engine
The Flutter Engine
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.
4REG_FIDDLE(Paint_setARGB, 256, 256, true, 0) {
5void draw(SkCanvas* canvas) {
6 SkPaint transRed1, transRed2;
7 transRed1.setARGB(255 / 2, 255, 0, 0);
8 transRed2.setColor(SkColorSetARGB(255 / 2, 255, 0, 0));
9 SkDebugf("transRed1 %c= transRed2", transRed1 == transRed2 ? '=' : '!');
10}
11} // END FIDDLE
REG_FIDDLE(Paint_setARGB, 256, 256, true, 0)
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