1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/skia/trunk/src/effects/gradients/SkRadialGradient.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,40 @@ 1.4 + 1.5 +/* 1.6 + * Copyright 2012 Google Inc. 1.7 + * 1.8 + * Use of this source code is governed by a BSD-style license that can be 1.9 + * found in the LICENSE file. 1.10 + */ 1.11 + 1.12 +#ifndef SkRadialGradient_DEFINED 1.13 +#define SkRadialGradient_DEFINED 1.14 + 1.15 +#include "SkGradientShaderPriv.h" 1.16 + 1.17 +class SkRadialGradient : public SkGradientShaderBase { 1.18 +public: 1.19 + SkRadialGradient(const SkPoint& center, SkScalar radius, const Descriptor&); 1.20 + virtual void shadeSpan(int x, int y, SkPMColor* dstC, int count) 1.21 + SK_OVERRIDE; 1.22 + virtual void shadeSpan16(int x, int y, uint16_t* dstCParam, 1.23 + int count) SK_OVERRIDE; 1.24 + virtual BitmapType asABitmap(SkBitmap* bitmap, 1.25 + SkMatrix* matrix, 1.26 + TileMode* xy) const SK_OVERRIDE; 1.27 + virtual GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE; 1.28 + virtual GrEffectRef* asNewEffect(GrContext* context, const SkPaint&) const SK_OVERRIDE; 1.29 + 1.30 + SK_TO_STRING_OVERRIDE() 1.31 + SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkRadialGradient) 1.32 + 1.33 +protected: 1.34 + SkRadialGradient(SkReadBuffer& buffer); 1.35 + virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE; 1.36 + 1.37 +private: 1.38 + typedef SkGradientShaderBase INHERITED; 1.39 + const SkPoint fCenter; 1.40 + const SkScalar fRadius; 1.41 +}; 1.42 + 1.43 +#endif