SkTrimPE.h 782 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright 2018 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. #ifndef SkTrimImpl_DEFINED
  8. #define SkTrimImpl_DEFINED
  9. #include "include/core/SkPathEffect.h"
  10. #include "include/effects/SkTrimPathEffect.h"
  11. class SkTrimPE : public SkPathEffect {
  12. public:
  13. SkTrimPE(SkScalar startT, SkScalar stopT, SkTrimPathEffect::Mode);
  14. protected:
  15. void flatten(SkWriteBuffer&) const override;
  16. bool onFilterPath(SkPath* dst, const SkPath& src, SkStrokeRec*, const SkRect*) const override;
  17. private:
  18. SK_FLATTENABLE_HOOKS(SkTrimPE)
  19. const SkScalar fStartT,
  20. fStopT;
  21. const SkTrimPathEffect::Mode fMode;
  22. typedef SkPathEffect INHERITED;
  23. };
  24. #endif