00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef SkGradientShader_DEFINED
00018 #define SkGradientShader_DEFINED
00019
00020 #include "SkShader.h"
00021
00022 class SkUnitMapper;
00023
00029 class SkGradientShader {
00030 public:
00048 static SkShader* CreateLinear( const SkPoint pts[2],
00049 const SkColor colors[], const SkScalar pos[], int count,
00050 SkShader::TileMode mode,
00051 SkUnitMapper* mapper = NULL);
00052
00070 static SkShader* CreateRadial( const SkPoint& center, SkScalar radius,
00071 const SkColor colors[], const SkScalar pos[], int count,
00072 SkShader::TileMode mode,
00073 SkUnitMapper* mapper = NULL);
00074
00095 static SkShader* CreateTwoPointRadial(const SkPoint& start,
00096 SkScalar startRadius,
00097 const SkPoint& end,
00098 SkScalar endRadius,
00099 const SkColor colors[],
00100 const SkScalar pos[], int count,
00101 SkShader::TileMode mode,
00102 SkUnitMapper* mapper = NULL);
00119 static SkShader* CreateSweep(SkScalar cx, SkScalar cy,
00120 const SkColor colors[], const SkScalar pos[],
00121 int count, SkUnitMapper* mapper = NULL);
00122 };
00123
00124 #endif
00125