Flutter Engine
The Flutter Engine
redwhiteonblue.cpp
Go to the documentation of this file.
1// Copyright 2020 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(redwhiteonblue, 256, 256, false, 0) {
5void draw(SkCanvas* canvas) {
6 canvas->clear(SK_ColorBLUE);
8 paint.setAntiAlias(true);
9 paint.setColor(SK_ColorWHITE);
10 canvas->drawRect({10.5, 10.5, 120.5, 120.5}, paint);
11 paint.setColor(SK_ColorRED);
12 canvas->drawRect({120.5, 10.5, 230.5, 120.5}, paint);
13}
14} // END FIDDLE
constexpr SkColor SK_ColorBLUE
Definition: SkColor.h:135
constexpr SkColor SK_ColorRED
Definition: SkColor.h:126
constexpr SkColor SK_ColorWHITE
Definition: SkColor.h:122
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
void drawRect(const SkRect &rect, const SkPaint &paint)
Definition: SkCanvas.cpp:1673
void clear(SkColor color)
Definition: SkCanvas.h:1199
const Paint & paint
Definition: color_source.cc:38
REG_FIDDLE(redwhiteonblue, 256, 256, false, 0)