1 /* 2 * Copyright 2006 The Android Open Source Project 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 Sk1DPathEffect_DEFINED 9 #define Sk1DPathEffect_DEFINED 10 11 #include "include/core/SkPathEffect.h" 12 13 class SK_API SkPath1DPathEffect { 14 public: 15 enum Style { 16 kTranslate_Style, // translate the shape to each position 17 kRotate_Style, // rotate the shape about its center 18 kMorph_Style, // transform each point, and turn lines into curves 19 20 kLastEnum_Style = kMorph_Style, 21 }; 22 23 /** Dash by replicating the specified path. 24 @param path The path to replicate (dash) 25 @param advance The space between instances of path 26 @param phase distance (mod advance) along path for its initial position 27 @param style how to transform path at each point (based on the current 28 position and tangent) 29 */ 30 static sk_sp<SkPathEffect> Make(const SkPath& path, SkScalar advance, SkScalar phase, Style); 31 32 static void RegisterFlattenables(); 33 }; 34 35 #endif 36