Flutter Engine
The Flutter Engine
Rect_isFinite.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(Rect_isFinite, 256, 256, true, 0) {
5void draw(SkCanvas* canvas) {
7 SkDebugf("largest is finite: %s\n", largest.isFinite() ? "true" : "false");
8 SkDebugf("large width %g\n", largest.width());
9 SkRect widest = SkRect::MakeWH(largest.width(), largest.height());
10 SkDebugf("widest is finite: %s\n", widest.isFinite() ? "true" : "false");
11}
12} // END FIDDLE
REG_FIDDLE(Rect_isFinite, 256, 256, true, 0)
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
#define SK_ScalarMin
Definition: SkScalar.h:25
#define SK_ScalarMax
Definition: SkScalar.h:24
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
bool isFinite() const
Definition: SkRect.h:711
constexpr float height() const
Definition: SkRect.h:769
constexpr float width() const
Definition: SkRect.h:762
static constexpr SkRect MakeWH(float w, float h)
Definition: SkRect.h:609