Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
SkOpEdgeBuilder.cpp File Reference
#include "src/pathops/SkOpEdgeBuilder.h"
#include "include/core/SkPath.h"
#include "include/core/SkPoint.h"
#include "include/core/SkTypes.h"
#include "include/private/base/SkFloatingPoint.h"
#include "src/base/SkTSort.h"
#include "src/core/SkGeometry.h"
#include "src/core/SkPathPriv.h"
#include "src/pathops/SkPathOpsCubic.h"
#include "src/pathops/SkPathOpsPoint.h"
#include "src/pathops/SkReduceOrder.h"
#include <algorithm>
#include <array>

Go to the source code of this file.

Functions

static SkPoint force_small_to_zero (const SkPoint &pt)
 
static bool can_add_curve (SkPath::Verb verb, SkPoint *curve)
 

Function Documentation

◆ can_add_curve()

static bool can_add_curve ( SkPath::Verb  verb,
SkPoint curve 
)
static

Definition at line 43 of file SkOpEdgeBuilder.cpp.

43 {
44 if (SkPath::kMove_Verb == verb) {
45 return false;
46 }
47 for (int index = 0; index <= SkPathOpsVerbToPoints(verb); ++index) {
48 curve[index] = force_small_to_zero(curve[index]);
49 }
50 return SkPath::kLine_Verb != verb || !SkDPoint::ApproximatelyEqual(curve[0], curve[1]);
51}
static SkPoint force_small_to_zero(const SkPoint &pt)
int SkPathOpsVerbToPoints(SkPath::Verb verb)
@ kMove_Verb
Definition SkPath.h:1458
@ kLine_Verb
Definition SkPath.h:1459
static bool ApproximatelyEqual(const SkPoint &a, const SkPoint &b)

◆ force_small_to_zero()

static SkPoint force_small_to_zero ( const SkPoint pt)
static

Definition at line 32 of file SkOpEdgeBuilder.cpp.

32 {
33 SkPoint ret = pt;
35 ret.fX = 0;
36 }
38 ret.fY = 0;
39 }
40 return ret;
41}
const double FLT_EPSILON_ORDERABLE_ERR
#define SkScalarAbs(x)
Definition SkScalar.h:39
float fX
x-axis value
float fY
y-axis value