1 /*
2 * Copyright 2014 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
8 #include "SkPathOpsTSect.h"
9
intersect(const SkDQuad & quad1,const SkDQuad & quad2)10 int SkIntersections::intersect(const SkDQuad& quad1, const SkDQuad& quad2) {
11 SkTSect<SkDQuad, SkDQuad> sect1(quad1 PATH_OPS_DEBUG_T_SECT_PARAMS(1));
12 SkTSect<SkDQuad, SkDQuad> sect2(quad2 PATH_OPS_DEBUG_T_SECT_PARAMS(2));
13 SkTSect<SkDQuad, SkDQuad>::BinarySearch(§1, §2, this);
14 return used();
15 }
16
intersect(const SkDConic & conic,const SkDQuad & quad)17 int SkIntersections::intersect(const SkDConic& conic, const SkDQuad& quad) {
18 SkTSect<SkDConic, SkDQuad> sect1(conic PATH_OPS_DEBUG_T_SECT_PARAMS(1));
19 SkTSect<SkDQuad, SkDConic> sect2(quad PATH_OPS_DEBUG_T_SECT_PARAMS(2));
20 SkTSect<SkDConic, SkDQuad>::BinarySearch(§1, §2, this);
21 return used();
22 }
23
intersect(const SkDConic & conic1,const SkDConic & conic2)24 int SkIntersections::intersect(const SkDConic& conic1, const SkDConic& conic2) {
25 SkTSect<SkDConic, SkDConic> sect1(conic1 PATH_OPS_DEBUG_T_SECT_PARAMS(1));
26 SkTSect<SkDConic, SkDConic> sect2(conic2 PATH_OPS_DEBUG_T_SECT_PARAMS(2));
27 SkTSect<SkDConic, SkDConic>::BinarySearch(§1, §2, this);
28 return used();
29 }
30
intersect(const SkDCubic & cubic,const SkDQuad & quad)31 int SkIntersections::intersect(const SkDCubic& cubic, const SkDQuad& quad) {
32 SkTSect<SkDCubic, SkDQuad> sect1(cubic PATH_OPS_DEBUG_T_SECT_PARAMS(1));
33 SkTSect<SkDQuad, SkDCubic> sect2(quad PATH_OPS_DEBUG_T_SECT_PARAMS(2));
34 SkTSect<SkDCubic, SkDQuad>::BinarySearch(§1, §2, this);
35 return used();
36 }
37
intersect(const SkDCubic & cubic,const SkDConic & conic)38 int SkIntersections::intersect(const SkDCubic& cubic, const SkDConic& conic) {
39 SkTSect<SkDCubic, SkDConic> sect1(cubic PATH_OPS_DEBUG_T_SECT_PARAMS(1));
40 SkTSect<SkDConic, SkDCubic> sect2(conic PATH_OPS_DEBUG_T_SECT_PARAMS(2));
41 SkTSect<SkDCubic, SkDConic>::BinarySearch(§1, §2, this);
42 return used();
43 }
44
intersect(const SkDCubic & cubic1,const SkDCubic & cubic2)45 int SkIntersections::intersect(const SkDCubic& cubic1, const SkDCubic& cubic2) {
46 SkTSect<SkDCubic, SkDCubic> sect1(cubic1 PATH_OPS_DEBUG_T_SECT_PARAMS(1));
47 SkTSect<SkDCubic, SkDCubic> sect2(cubic2 PATH_OPS_DEBUG_T_SECT_PARAMS(2));
48 SkTSect<SkDCubic, SkDCubic>::BinarySearch(§1, §2, this);
49 return used();
50 }
51