Home | History | Annotate | Download | only in include
      1 /*
      2 * Copyright 2019 Google LLC
      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 SkParticleDrawable_DEFINED
      9 #define SkParticleDrawable_DEFINED
     10 
     11 #include "SkReflected.h"
     12 
     13 class SkCanvas;
     14 struct SkParticleState;
     15 class SkPaint;
     16 class SkString;
     17 
     18 class SkParticleDrawable : public SkReflected {
     19 public:
     20     REFLECTED_ABSTRACT(SkParticleDrawable, SkReflected)
     21 
     22     virtual void draw(SkCanvas* canvas, const SkParticleState particles[], int count,
     23                       const SkPaint* paint) = 0;
     24 
     25     static void RegisterDrawableTypes();
     26 
     27     static sk_sp<SkParticleDrawable> MakeCircle(int radius);
     28     static sk_sp<SkParticleDrawable> MakeImage(const SkString& path, int cols, int rows);
     29 };
     30 
     31 #endif // SkParticleEffect_DEFINED
     32