| 195 | } |
| 196 | |
| 197 | static bool PointIsBetween(const tgfx::Point& point, const tgfx::Point& start, |
| 198 | const tgfx::Point& end) { |
| 199 | auto minX = std::min(start.x, end.x); |
| 200 | auto maxX = std::max(start.x, end.x); |
| 201 | auto minY = std::min(start.y, end.y); |
| 202 | auto maxY = std::max(start.y, end.y); |
| 203 | return minX <= point.x && point.x <= maxX && minY <= point.y && point.y <= maxY; |
| 204 | } |
| 205 | |
| 206 | void CornerPinEffect::calculateVertexQs() { |
| 207 | // https://www.reedbeta.com/blog/quadrilateral-interpolation-part-1/ |