Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
SkPathOpsLine.h
Go to the documentation of this file.
1/*
2 * Copyright 2012 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7#ifndef SkPathOpsLine_DEFINED
8#define SkPathOpsLine_DEFINED
9
13
14struct SkDLine {
16
17 const SkDPoint& operator[](int n) const { SkASSERT(n >= 0 && n < 2); return fPts[n]; }
18 SkDPoint& operator[](int n) { SkASSERT(n >= 0 && n < 2); return fPts[n]; }
19
20 const SkDLine& set(const SkPoint pts[2]) {
21 fPts[0] = pts[0];
22 fPts[1] = pts[1];
23 return *this;
24 }
25
26 double exactPoint(const SkDPoint& xy) const;
27 static double ExactPointH(const SkDPoint& xy, double left, double right, double y);
28 static double ExactPointV(const SkDPoint& xy, double top, double bottom, double x);
29
30 double nearPoint(const SkDPoint& xy, bool* unequal) const;
31 bool nearRay(const SkDPoint& xy) const;
32 static double NearPointH(const SkDPoint& xy, double left, double right, double y);
33 static double NearPointV(const SkDPoint& xy, double top, double bottom, double x);
34 SkDPoint ptAtT(double t) const;
35
36 void dump() const;
37 void dumpID(int ) const;
38 void dumpInner() const;
39};
40
41#endif
#define SkASSERT(cond)
Definition SkAssert.h:116
static bool left(const SkPoint &p0, const SkPoint &p1)
static bool right(const SkPoint &p0, const SkPoint &p1)
double y
double x
double exactPoint(const SkDPoint &xy) const
static double ExactPointV(const SkDPoint &xy, double top, double bottom, double x)
void dumpID(int) const
bool nearRay(const SkDPoint &xy) const
SkDPoint & operator[](int n)
SkDPoint ptAtT(double t) const
static double NearPointH(const SkDPoint &xy, double left, double right, double y)
void dump() const
SkDPoint fPts[2]
static double NearPointV(const SkDPoint &xy, double top, double bottom, double x)
static double ExactPointH(const SkDPoint &xy, double left, double right, double y)
double nearPoint(const SkDPoint &xy, bool *unequal) const
const SkDPoint & operator[](int n) const
const SkDLine & set(const SkPoint pts[2])
void dumpInner() const