Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Color_Methods.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=214b559d75c65a7bef6ef4be1f860053
5REG_FIDDLE(Color_Methods, 256, 128, false, 0) {
6void draw(SkCanvas* canvas) {
8 paint.setColor(0x8000FF00); // transparent green
9 canvas->drawCircle(50, 50, 40, paint);
10 paint.setARGB(128, 255, 0, 0); // transparent red
11 canvas->drawCircle(80, 50, 40, paint);
12 paint.setColor(SK_ColorBLUE);
13 paint.setAlpha(0x80);
14 canvas->drawCircle(65, 65, 40, paint);
15}
16} // END FIDDLE
constexpr SkColor SK_ColorBLUE
Definition SkColor.h:135
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition aaclip.cpp:27
void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, const SkPaint &paint)
const Paint & paint
#define REG_FIDDLE(NAME, W, H, TEXT, I)
Definition examples.h:60