epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 1 | |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 2 | /* |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 3 | * Copyright 2006 The Android Open Source Project |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 4 | * |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 5 | * Use of this source code is governed by a BSD-style license that can be |
| 6 | * found in the LICENSE file. |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 7 | */ |
| 8 | |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 9 | |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 10 | #ifndef SkRasterizer_DEFINED |
| 11 | #define SkRasterizer_DEFINED |
| 12 | |
| 13 | #include "SkFlattenable.h" |
| 14 | #include "SkMask.h" |
| 15 | |
| 16 | class SkMaskFilter; |
| 17 | class SkMatrix; |
| 18 | class SkPath; |
| 19 | struct SkIRect; |
| 20 | |
bungeman@google.com | 4200dfe | 2012-10-13 17:13:18 +0000 | [diff] [blame] | 21 | class SK_API SkRasterizer : public SkFlattenable { |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 22 | public: |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 23 | /** Turn the path into a mask, respecting the specified local->device matrix. |
| 24 | */ |
| 25 | bool rasterize(const SkPath& path, const SkMatrix& matrix, |
| 26 | const SkIRect* clipBounds, SkMaskFilter* filter, |
reed@google.com | fdba404 | 2012-12-18 16:57:03 +0000 | [diff] [blame] | 27 | SkMask* mask, SkMask::CreateMode mode) const; |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 28 | |
mtklein | 3b37545 | 2016-04-04 14:57:19 -0700 | [diff] [blame] | 29 | SK_DEFINE_FLATTENABLE_TYPE(SkRasterizer) |
| 30 | |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 31 | protected: |
commit-bot@chromium.org | f792a1b | 2014-02-26 13:27:37 +0000 | [diff] [blame] | 32 | SkRasterizer() {} |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 33 | virtual bool onRasterize(const SkPath& path, const SkMatrix& matrix, |
| 34 | const SkIRect* clipBounds, |
reed@google.com | fdba404 | 2012-12-18 16:57:03 +0000 | [diff] [blame] | 35 | SkMask* mask, SkMask::CreateMode mode) const; |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 36 | |
| 37 | private: |
| 38 | typedef SkFlattenable INHERITED; |
| 39 | }; |
| 40 | |
| 41 | #endif |