blob: 1881ccef245526c90919a1ad86c076ef0e622a74 [file] [log] [blame]
epoger@google.comec3ed6a2011-07-28 14:26:00 +00001
reed@android.com8a1c16f2008-12-17 15:59:43 +00002/*
epoger@google.comec3ed6a2011-07-28 14:26:00 +00003 * Copyright 2006 The Android Open Source Project
reed@android.com8a1c16f2008-12-17 15:59:43 +00004 *
epoger@google.comec3ed6a2011-07-28 14:26:00 +00005 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
reed@android.com8a1c16f2008-12-17 15:59:43 +00007 */
8
epoger@google.comec3ed6a2011-07-28 14:26:00 +00009
reed@android.com8a1c16f2008-12-17 15:59:43 +000010#ifndef SkRasterizer_DEFINED
11#define SkRasterizer_DEFINED
12
13#include "SkFlattenable.h"
14#include "SkMask.h"
15
16class SkMaskFilter;
17class SkMatrix;
18class SkPath;
19struct SkIRect;
20
bungeman@google.com4200dfe2012-10-13 17:13:18 +000021class SK_API SkRasterizer : public SkFlattenable {
reed@android.com8a1c16f2008-12-17 15:59:43 +000022public:
reed@android.com8a1c16f2008-12-17 15:59:43 +000023 /** 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.comfdba4042012-12-18 16:57:03 +000027 SkMask* mask, SkMask::CreateMode mode) const;
reed@android.com8a1c16f2008-12-17 15:59:43 +000028
mtklein3b375452016-04-04 14:57:19 -070029 SK_DEFINE_FLATTENABLE_TYPE(SkRasterizer)
30
reed@android.com8a1c16f2008-12-17 15:59:43 +000031protected:
commit-bot@chromium.orgf792a1b2014-02-26 13:27:37 +000032 SkRasterizer() {}
reed@android.com8a1c16f2008-12-17 15:59:43 +000033 virtual bool onRasterize(const SkPath& path, const SkMatrix& matrix,
34 const SkIRect* clipBounds,
reed@google.comfdba4042012-12-18 16:57:03 +000035 SkMask* mask, SkMask::CreateMode mode) const;
reed@android.com8a1c16f2008-12-17 15:59:43 +000036
37private:
38 typedef SkFlattenable INHERITED;
39};
40
41#endif