caryclark@google.com | 9e49fb6 | 2012-08-27 14:11:33 +0000 | [diff] [blame] | 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 | */ |
caryclark@google.com | 27accef | 2012-01-25 18:57:23 +0000 | [diff] [blame] | 7 | #include "DataTypes.h" |
| 8 | |
| 9 | bool implicitLine(const _Line& line, double& slope, double& axisIntercept); |
| 10 | int reduceOrder(const _Line& line, _Line& reduced); |
caryclark@google.com | beda389 | 2013-02-07 13:13:41 +0000 | [diff] [blame] | 11 | double is_left(const _Line& line, const _Point& pt); |
caryclark@google.com | 9d5f99b | 2013-01-22 12:55:54 +0000 | [diff] [blame] | 12 | void sub_divide(const _Line& src, double t1, double t2, _Line& dst); |
caryclark@google.com | 8dcf114 | 2012-07-02 20:27:02 +0000 | [diff] [blame] | 13 | double t_at(const _Line&, const _Point& ); |
| 14 | void xy_at_t(const _Line& , double t, double& x, double& y); |
caryclark@google.com | 45a8fc6 | 2013-02-14 15:29:11 +0000 | [diff] [blame] | 15 | _Point xy_at_t(const _Line& , double t); |
caryclark@google.com | 8dcf114 | 2012-07-02 20:27:02 +0000 | [diff] [blame] | 16 | |
| 17 | enum x_at_flags { |
| 18 | kFindTopMin = 1, |
| 19 | kFindTopMax = 2, |
| 20 | kFindBottomMin = 4, |
| 21 | kFindBottomMax = 8 |
| 22 | }; |
| 23 | |
| 24 | void x_at(const _Point& p1, const _Point& p2, double minY, double maxY, |
| 25 | int flags, double& tMin, double& tMax); |