Flutter Engine
The Flutter Engine
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.
4REG_FIDDLE(Path_swap, 256, 256, true, 0) {
5void draw(SkCanvas* canvas) {
7 path1.addRect({10, 20, 30, 40});
9 const SkRect& b1 = path1.getBounds();
10 SkDebugf("path1 bounds = %g, %g, %g, %g\n", b1.fLeft, b1.fTop, b1.fRight, b1.fBottom);
11 const SkRect& b2 = path2.getBounds();
12 SkDebugf("path2 bounds = %g, %g, %g, %g\n", b2.fLeft, b2.fTop, b2.fRight, b2.fBottom);
13}
14} // END FIDDLE
static SkPath path1()
static SkPath path2()
REG_FIDDLE(Path_swap, 256, 256, true, 0)
Definition: Path_swap.cpp:4
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
Definition: SkPath.h:59
const SkRect & getBounds() const
Definition: SkPath.cpp:430
void swap(SkPath &other)
Definition: SkPath.cpp:219
SkPath & addRect(const SkRect &rect, SkPathDirection dir, unsigned start)
Definition: SkPath.cpp:864
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