Flutter Engine
The Flutter Engine
Functions
Point_isZero.cpp File Reference
#include "tools/fiddle/examples.h"

Go to the source code of this file.

Functions

 REG_FIDDLE (Point_isZero, 256, 256, true, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( Point_isZero  ,
256  ,
256  ,
true  ,
 
)

Definition at line 4 of file Point_isZero.cpp.

4 {
5void draw(SkCanvas* canvas) {
6 SkPoint pt = { 0.f, -0.f};
7 SkDebugf("pt.fX=%c%g pt.fY=%c%g\n", std::signbit(pt.fX) ? '-' : '+', fabsf(pt.fX),
8 std::signbit(pt.fY) ? '-' : '+', fabsf(pt.fY));
9 SkDebugf("pt.isZero() == %s\n", pt.isZero() ? "true" : "false");
10}
11} // END FIDDLE
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
bool isZero() const
Definition: SkPoint_impl.h:193
float fX
x-axis value
Definition: SkPoint_impl.h:164
float fY
y-axis value
Definition: SkPoint_impl.h:165