1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/skia/trunk/src/effects/gradients/SkSweepGradient.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 SkSweepGradient_DEFINED 1.13 +#define SkSweepGradient_DEFINED 1.14 + 1.15 +#include "SkGradientShaderPriv.h" 1.16 + 1.17 +class SkSweepGradient : public SkGradientShaderBase { 1.18 +public: 1.19 + SkSweepGradient(SkScalar cx, SkScalar cy, const Descriptor&); 1.20 + virtual void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVERRIDE; 1.21 + virtual void shadeSpan16(int x, int y, uint16_t dstC[], int count) SK_OVERRIDE; 1.22 + 1.23 + virtual BitmapType asABitmap(SkBitmap* bitmap, 1.24 + SkMatrix* matrix, 1.25 + TileMode* xy) const SK_OVERRIDE; 1.26 + 1.27 + virtual GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE; 1.28 + 1.29 + virtual GrEffectRef* asNewEffect(GrContext* context, const SkPaint&) const SK_OVERRIDE; 1.30 + 1.31 + SK_TO_STRING_OVERRIDE() 1.32 + SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkSweepGradient) 1.33 + 1.34 +protected: 1.35 + SkSweepGradient(SkReadBuffer& buffer); 1.36 + virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE; 1.37 + 1.38 +private: 1.39 + typedef SkGradientShaderBase INHERITED; 1.40 + const SkPoint fCenter; 1.41 +}; 1.42 + 1.43 +#endif