Flutter Engine
The Flutter Engine
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.
4REG_FIDDLE(Color_Methods, 256, 128, false, 0) {
5void draw(SkCanvas* canvas) {
7 paint.setColor(0x8000FF00); // transparent green
8 canvas->drawCircle(50, 50, 40, paint);
9 paint.setARGB(128, 255, 0, 0); // transparent red
10 canvas->drawCircle(80, 50, 40, paint);
11 paint.setColor(SK_ColorBLUE);
12 paint.setAlpha(0x80);
13 canvas->drawCircle(65, 65, 40, paint);
14}
15} // END FIDDLE
REG_FIDDLE(Color_Methods, 256, 128, false, 0)
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)
Definition: SkCanvas.cpp:2707
const Paint & paint
Definition: color_source.cc:38