Flutter Engine
The Flutter Engine
|
#include "include/core/SkPath.h"
#include "include/core/SkPathBuilder.h"
#include "include/core/SkRRect.h"
#include "include/core/SkStream.h"
#include "include/core/SkString.h"
#include "include/private/SkPathRef.h"
#include "include/private/base/SkFloatingPoint.h"
#include "include/private/base/SkMalloc.h"
#include "include/private/base/SkTArray.h"
#include "include/private/base/SkTDArray.h"
#include "include/private/base/SkTo.h"
#include "src/base/SkFloatBits.h"
#include "src/base/SkTLazy.h"
#include "src/base/SkVx.h"
#include "src/core/SkCubicClipper.h"
#include "src/core/SkEdgeClipper.h"
#include "src/core/SkGeometry.h"
#include "src/core/SkMatrixPriv.h"
#include "src/core/SkPathEnums.h"
#include "src/core/SkPathMakers.h"
#include "src/core/SkPathPriv.h"
#include "src/core/SkPointPriv.h"
#include "src/core/SkStringUtils.h"
#include <algorithm>
#include <cmath>
#include <cstring>
#include <iterator>
#include <limits.h>
#include <utility>
Go to the source code of this file.
Classes | |
struct | SkPath_Storage_Equivalent |
class | SkAutoDisableDirectionCheck |
class | SkAutoPathBoundsUpdate |
struct | Convexicator |
class | ContourIter |
struct | SkHalfPlane |
Macros | |
#define | INITIAL_LASTMOVETOINDEX_VALUE ~0 |
#define | kValueNeverReturnedBySign 2 |
Enumerations | |
enum | DirChange { kUnknown_DirChange , kLeft_DirChange , kRight_DirChange , kStraight_DirChange , kBackwards_DirChange , kInvalid_DirChange } |
Functions | |
static float | poly_eval (float A, float B, float C, float t) |
static float | poly_eval (float A, float B, float C, float D, float t) |
static void | joinNoEmptyChecks (SkRect *dst, const SkRect &src) |
static bool | is_degenerate (const SkPath &path) |
bool | operator== (const SkPath &a, const SkPath &b) |
static bool | check_edge_against_rect (const SkPoint &p0, const SkPoint &p1, const SkRect &rect, SkPathFirstDirection dir) |
static int | rect_make_dir (SkScalar dx, SkScalar dy) |
static void | assert_known_direction (SkPathDirection dir) |
static bool | arc_is_lone_point (const SkRect &oval, SkScalar startAngle, SkScalar sweepAngle, SkPoint *pt) |
static void | angles_to_unit_vectors (SkScalar startAngle, SkScalar sweepAngle, SkVector *startV, SkVector *stopV, SkRotationDirection *dir) |
static int | build_arc_conics (const SkRect &oval, const SkVector &start, const SkVector &stop, SkRotationDirection dir, SkConic conics[SkConic::kMaxConicsForArc], SkPoint *singlePt) |
static void | subdivide_cubic_to (SkPath *path, const SkPoint pts[4], int level=2) |
static void | append_params (SkString *str, const char label[], const SkPoint pts[], int count, SkScalarAsStringType strType, SkScalar conicWeight=-12345) |
static int | sign (SkScalar x) |
static SkScalar | cross_prod (const SkPoint &p0, const SkPoint &p1, const SkPoint &p2) |
static int | find_max_y (const SkPoint pts[], int count) |
static int | find_diff_pt (const SkPoint pts[], int index, int n, int inc) |
static int | find_min_max_x_at_y (const SkPoint pts[], int index, int n, int *maxIndexPtr) |
static SkPathFirstDirection | crossToDir (SkScalar cross) |
static bool | between (SkScalar a, SkScalar b, SkScalar c) |
static SkScalar | eval_cubic_pts (SkScalar c0, SkScalar c1, SkScalar c2, SkScalar c3, SkScalar t) |
template<size_t N> | |
static void | find_minmax (const SkPoint pts[], SkScalar *minPtr, SkScalar *maxPtr) |
static bool | checkOnCurve (SkScalar x, SkScalar y, const SkPoint &start, const SkPoint &end) |
static int | winding_mono_cubic (const SkPoint pts[], SkScalar x, SkScalar y, int *onCurveCount) |
static int | winding_cubic (const SkPoint pts[], SkScalar x, SkScalar y, int *onCurveCount) |
static double | conic_eval_numerator (const SkScalar src[], SkScalar w, SkScalar t) |
static double | conic_eval_denominator (SkScalar w, SkScalar t) |
static int | winding_mono_conic (const SkConic &conic, SkScalar x, SkScalar y, int *onCurveCount) |
static bool | is_mono_quad (SkScalar y0, SkScalar y1, SkScalar y2) |
static int | winding_conic (const SkPoint pts[], SkScalar x, SkScalar y, SkScalar weight, int *onCurveCount) |
static int | winding_mono_quad (const SkPoint pts[], SkScalar x, SkScalar y, int *onCurveCount) |
static int | winding_quad (const SkPoint pts[], SkScalar x, SkScalar y, int *onCurveCount) |
static int | winding_line (const SkPoint pts[], SkScalar x, SkScalar y, int *onCurveCount) |
static void | tangent_cubic (const SkPoint pts[], SkScalar x, SkScalar y, SkTDArray< SkVector > *tangents) |
static void | tangent_conic (const SkPoint pts[], SkScalar x, SkScalar y, SkScalar w, SkTDArray< SkVector > *tangents) |
static void | tangent_quad (const SkPoint pts[], SkScalar x, SkScalar y, SkTDArray< SkVector > *tangents) |
static void | tangent_line (const SkPoint pts[], SkScalar x, SkScalar y, SkTDArray< SkVector > *tangents) |
static bool | contains_inclusive (const SkRect &r, SkScalar x, SkScalar y) |
static int | compute_quad_extremas (const SkPoint src[3], SkPoint extremas[3]) |
static int | compute_conic_extremas (const SkPoint src[3], SkScalar w, SkPoint extremas[3]) |
static int | compute_cubic_extremas (const SkPoint src[4], SkPoint extremas[5]) |
SkPathVerbAnalysis | sk_path_analyze_verbs (const uint8_t vbs[], int verbCount) |
static SkPath | clip (const SkPath &path, const SkHalfPlane &plane) |
#define INITIAL_LASTMOVETOINDEX_VALUE ~0 |
Definition at line 152 of file SkPath.cpp.
#define kValueNeverReturnedBySign 2 |
Definition at line 2142 of file SkPath.cpp.
enum DirChange |
Enumerator | |
---|---|
kUnknown_DirChange | |
kLeft_DirChange | |
kRight_DirChange | |
kStraight_DirChange | |
kBackwards_DirChange | |
kInvalid_DirChange |
Definition at line 2144 of file SkPath.cpp.
|
static |
Definition at line 930 of file SkPath.cpp.
|
static |
Definition at line 1941 of file SkPath.cpp.
|
static |
Definition at line 907 of file SkPath.cpp.
|
static |
Definition at line 850 of file SkPath.cpp.
Definition at line 2652 of file SkPath.cpp.
|
static |
If this returns 0, then the caller should just line-to the singlePt, else it should ignore singlePt and append the specified number of conics.
Definition at line 968 of file SkPath.cpp.
|
inlinestatic |
Definition at line 263 of file SkPath.cpp.
|
static |
Definition at line 2679 of file SkPath.cpp.
|
static |
Definition at line 3824 of file SkPath.cpp.
Definition at line 3353 of file SkPath.cpp.
Definition at line 3366 of file SkPath.cpp.
Definition at line 3341 of file SkPath.cpp.
Definition at line 2754 of file SkPath.cpp.
Definition at line 2743 of file SkPath.cpp.
Definition at line 3050 of file SkPath.cpp.
Definition at line 2473 of file SkPath.cpp.
|
static |
Definition at line 2551 of file SkPath.cpp.
Definition at line 2509 of file SkPath.cpp.
Definition at line 2495 of file SkPath.cpp.
Starting at index, and moving forward (incrementing), find the xmin and xmax of the contiguous points that have the same Y.
Definition at line 2527 of file SkPath.cpp.
|
static |
Definition at line 2667 of file SkPath.cpp.
|
static |
Definition at line 71 of file SkPath.cpp.
Definition at line 2811 of file SkPath.cpp.
Path.bounds is defined to be the bounds of all the control points. If we called bounds.join(r) we would skip r if r was empty, which breaks our promise. Hence we have a custom joiner that doesn't look at emptiness
Definition at line 64 of file SkPath.cpp.
Compares a and b; returns true if SkPath::FillType, verb array, SkPoint array, and weights are equivalent.
Definition at line 210 of file SkPath.cpp.
|
static |
|
static |
Definition at line 49 of file SkPath.cpp.
Definition at line 502 of file SkPath.cpp.
Definition at line 2141 of file SkPath.cpp.
SkPathVerbAnalysis sk_path_analyze_verbs | ( | const uint8_t | vbs[], |
int | verbCount | ||
) |
Definition at line 3447 of file SkPath.cpp.
Definition at line 1634 of file SkPath.cpp.
|
static |
Definition at line 2975 of file SkPath.cpp.
|
static |
Definition at line 2947 of file SkPath.cpp.
|
static |
|
static |
Definition at line 3002 of file SkPath.cpp.
|
static |
Definition at line 2823 of file SkPath.cpp.
Definition at line 2733 of file SkPath.cpp.
Definition at line 2907 of file SkPath.cpp.
|
static |
Definition at line 2761 of file SkPath.cpp.
|
static |
Definition at line 2687 of file SkPath.cpp.
|
static |
Definition at line 2837 of file SkPath.cpp.
Definition at line 2892 of file SkPath.cpp.