SkOpPathEffect.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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 SkOpPathEffect_DEFINED
  8. #define SkOpPathEffect_DEFINED
  9. #include "include/core/SkPaint.h"
  10. #include "include/core/SkPathEffect.h"
  11. #include "include/pathops/SkPathOps.h"
  12. class SK_API SkMergePathEffect {
  13. public:
  14. /* Defers to two other patheffects, and then combines their outputs using the specified op.
  15. * e.g.
  16. * result = output_one op output_two
  17. *
  18. * If either one or two is nullptr, then the original path is passed through to the op.
  19. */
  20. static sk_sp<SkPathEffect> Make(sk_sp<SkPathEffect> one, sk_sp<SkPathEffect> two, SkPathOp op);
  21. };
  22. class SK_API SkMatrixPathEffect {
  23. public:
  24. static sk_sp<SkPathEffect> MakeTranslate(SkScalar dx, SkScalar dy);
  25. static sk_sp<SkPathEffect> Make(const SkMatrix&);
  26. };
  27. class SK_API SkStrokePathEffect {
  28. public:
  29. static sk_sp<SkPathEffect> Make(SkScalar width, SkPaint::Join, SkPaint::Cap,
  30. SkScalar miter = 4);
  31. };
  32. #endif