Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Path_swap.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=4c5ebee2b5039e5faefa07ae63a15467
5REG_FIDDLE(Path_swap, 256, 256, true, 0) {
6void draw(SkCanvas* canvas) {
8 path1.addRect({10, 20, 30, 40});
10 const SkRect& b1 = path1.getBounds();
11 SkDebugf("path1 bounds = %g, %g, %g, %g\n", b1.fLeft, b1.fTop, b1.fRight, b1.fBottom);
12 const SkRect& b2 = path2.getBounds();
13 SkDebugf("path2 bounds = %g, %g, %g, %g\n", b2.fLeft, b2.fTop, b2.fRight, b2.fBottom);
14}
15} // END FIDDLE
static SkPath path1()
static SkPath path2()
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
const SkRect & getBounds() const
Definition SkPath.cpp:420
void swap(SkPath &other)
Definition SkPath.cpp:217
SkPath & addRect(const SkRect &rect, SkPathDirection dir, unsigned start)
Definition SkPath.cpp:854
#define REG_FIDDLE(NAME, W, H, TEXT, I)
Definition examples.h:60
SkScalar fBottom
larger y-axis bounds
Definition extension.cpp:17
SkScalar fLeft
smaller x-axis bounds
Definition extension.cpp:14
SkScalar fRight
larger x-axis bounds
Definition extension.cpp:16
SkScalar fTop
smaller y-axis bounds
Definition extension.cpp:15