skia2/docs/examples/Matrix_isFinite.cpp
Mike Reed c80ee456ad Revert "move onto new factories for SkMatrix"
This reverts commit 046c2b7d90.

Reason for revert: need to update/guard flutter

Original change's description:
> move onto new factories for SkMatrix
> 
> Just rename, no functional changes expected.
> 
> Change-Id: Id77ab1cf6b1cab35087a7c56000750912cf47383
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290831
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>

TBR=fmalita@chromium.org,reed@google.com

Change-Id: Ic74f177128913374b8c60b4df88f04cf72fbacb3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291359
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-05-21 16:05:20 +00:00

13 lines
529 B
C++

// Copyright 2019 Google LLC.
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#include "tools/fiddle/examples.h"
// HASH=bc6c6f6a5df770287120d87f81b922eb
REG_FIDDLE(Matrix_isFinite, 256, 256, true, 0) {
void draw(SkCanvas* canvas) {
SkMatrix matrix = SkMatrix::MakeTrans(SK_ScalarNaN, 0);
matrix.dump();
SkDebugf("matrix is finite: %s\n", matrix.isFinite() ? "true" : "false");
SkDebugf("matrix %c= matrix\n", matrix == matrix ? '=' : '!');
}
} // END FIDDLE