コード例 #1
0
int intersect() {
    addEndPoints();
    double rootVals[2];
    int roots = intersectRay(rootVals);
    for (int index = 0; index < roots; ++index) {
        double quadT = rootVals[index];
        double lineT = findLineT(quadT);
        if (pinTs(quadT, lineT)) {
            intersections.insert(quadT, lineT);
        }
    }
    return intersections.fUsed;
}
コード例 #2
0
 int intersect() {
     addEndPoints();
     double rootVals[2];
     int roots = intersectRay(rootVals);
     for (int index = 0; index < roots; ++index) {
         double quadT = rootVals[index];
         double lineT = findLineT(quadT);
         if (PinTs(&quadT, &lineT)) {
             SkDPoint pt = line.xyAtT(lineT);
             intersections->insert(quadT, lineT, pt);
         }
     }
     return intersections->used();
 }