blob: 91c5922eaf9b8460d2e6752bfe29832170f42879 [file] [log] [blame]
* Copyright 2019 Google LLC
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
#ifndef SkParticleDrawable_DEFINED
#define SkParticleDrawable_DEFINED
#include "modules/particles/include/SkReflected.h"
class SkCanvas;
struct SkParticles;
class SkPaint;
class SkString;
namespace skresources { class ResourceProvider; }
class SkParticleDrawable : public SkReflected {
REFLECTED_ABSTRACT(SkParticleDrawable, SkReflected)
virtual void draw(SkCanvas* canvas, const SkParticles& particles, int count,
const SkPaint& paint) = 0;
virtual void prepare(const skresources::ResourceProvider* resourceProvider) = 0;
static void RegisterDrawableTypes();
static sk_sp<SkParticleDrawable> MakeCircle(int radius);
static sk_sp<SkParticleDrawable> MakeImage(const SkString& path, const SkString& name,
int cols, int rows);
#endif // SkParticleEffect_DEFINED