diff options
Diffstat (limited to 'experimental')
-rw-r--r-- | experimental/SkiaExamples/HelloSkiaExample.cpp | 6 | ||||
-rw-r--r-- | experimental/webtry/templates/template.cpp | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/experimental/SkiaExamples/HelloSkiaExample.cpp b/experimental/SkiaExamples/HelloSkiaExample.cpp index 6fd2624c18..0b6c790460 100644 --- a/experimental/SkiaExamples/HelloSkiaExample.cpp +++ b/experimental/SkiaExamples/HelloSkiaExample.cpp @@ -13,6 +13,7 @@ #include "SkDraw.h" #include "SkGradientShader.h" #include "SkGraphics.h" +#include "SkUnitMappers.h" class HelloSkia : public SkExample { public: @@ -49,9 +50,12 @@ protected: }; SkColor linearColors[] = {SK_ColorGREEN, SK_ColorBLACK}; + SkUnitMapper* linearMapper = new SkDiscreteMapper(100); + SkAutoUnref lm_deleter(linearMapper); + SkShader* shader = SkGradientShader::CreateLinear( linearPoints, linearColors, NULL, 2, - SkShader::kMirror_TileMode); + SkShader::kMirror_TileMode, linearMapper); SkAutoUnref shader_deleter(shader); paint.setShader(shader); diff --git a/experimental/webtry/templates/template.cpp b/experimental/webtry/templates/template.cpp index 67d2c04dc9..5b017f0dff 100644 --- a/experimental/webtry/templates/template.cpp +++ b/experimental/webtry/templates/template.cpp @@ -150,6 +150,7 @@ #include "SkTSearch.h" #include "SkTypeface.h" #include "SkTypes.h" +#include "SkUnitMapper.h" #include "SkUnPreMultiply.h" #include "SkUtils.h" #include "SkWeakRefCnt.h" |