| 24 | using namespace pk; |
| 25 | |
| 26 | std::shared_ptr<PathEffect> PathEffect::MakeTrim(float startT, float stopT) { |
| 27 | if (isnan(startT) || isnan(stopT)) { |
| 28 | return nullptr; |
| 29 | } |
| 30 | if (startT <= 0 && stopT >= 1) { |
| 31 | return nullptr; |
| 32 | } |
| 33 | startT = std::max(0.f, std::min(startT, 1.f)); |
| 34 | stopT = std::max(0.f, std::min(stopT, 1.f)); |
| 35 | return std::shared_ptr<PathEffect>(new TrimPathEffect(startT, stopT)); |
| 36 | } |
| 37 | |
| 38 | bool TrimPathEffect::filterPath(Path* path) const { |
| 39 | if (path == nullptr) { |
nothing calls this directly
no outgoing calls
no test coverage detected