1 | /* |
2 | * Copyright 2016 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 | |
8 | #ifndef SkPaintImageFilter_DEFINED |
9 | #define SkPaintImageFilter_DEFINED |
10 | |
11 | #include "include/core/SkImageFilter.h" |
12 | |
13 | class SkPaint; |
14 | |
15 | // DEPRECATED: Use include/effects/SkImageFilters::Paint |
16 | class SK_API SkPaintImageFilter { |
17 | public: |
18 | /** Create a new image filter which fills the given rectangle using the |
19 | * given paint. If no rectangle is specified, an output is produced with |
20 | * the same bounds as the input primitive (even though the input |
21 | * primitive's pixels are not used for processing). |
22 | * @param paint Paint to use when filling the rect. |
23 | * @param rect Rectangle of output pixels. If NULL or a given crop edge is |
24 | * not specified, the source primitive's bounds are used |
25 | * instead. |
26 | */ |
27 | static sk_sp<SkImageFilter> Make(const SkPaint& paint, |
28 | const SkImageFilter::CropRect* cropRect = nullptr); |
29 | |
30 | static void RegisterFlattenables(); |
31 | |
32 | private: |
33 | SkPaintImageFilter() = delete; |
34 | }; |
35 | |
36 | #endif |
37 | |