コード例 #1
0
ファイル: composeshader.cpp プロジェクト: Just-D/skia
 ComposeShaderBitmapGM() {
     draw_color_bm(&fColorBitmap, squareLength);
     draw_alpha8_bm(&fAlpha8Bitmap, squareLength);
     SkMatrix s;
     s.reset();
     fColorBitmapShader = new SkBitmapProcShader(fColorBitmap, SkShader::kRepeat_TileMode,
                                                 SkShader::kRepeat_TileMode, &s);
     fAlpha8BitmapShader = new SkBitmapProcShader(fAlpha8Bitmap, SkShader::kRepeat_TileMode,
                                                  SkShader::kRepeat_TileMode, &s);
     fLinearGradientShader = make_linear_gradient_shader(squareLength);
 }
コード例 #2
0
ファイル: composeshader.cpp プロジェクト: MIPS/external-skia
 void onOnceBeforeDraw() override {
     draw_color_bm(&fColorBitmap, squareLength);
     draw_alpha8_bm(&fAlpha8Bitmap, squareLength);
     SkMatrix s;
     s.reset();
     fColorBitmapShader = SkShader::MakeBitmapShader(fColorBitmap, SkShader::kRepeat_TileMode,
                                                     SkShader::kRepeat_TileMode, &s);
     fAlpha8BitmapShader = SkShader::MakeBitmapShader(fAlpha8Bitmap, SkShader::kRepeat_TileMode,
                                                      SkShader::kRepeat_TileMode, &s);
     fLinearGradientShader = make_linear_gradient_shader(squareLength);
 }