OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 #include "SampleCode.h" | 7 #include "SampleCode.h" |
8 #include "SkBlurMask.h" | 8 #include "SkBlurMask.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkView.h" | 10 #include "SkView.h" |
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 | 520 |
521 void drawOneRaster(SkCanvas* canvas) { | 521 void drawOneRaster(SkCanvas* canvas) { |
522 canvas->save(); | 522 canvas->save(); |
523 | 523 |
524 SkScalar x = SkIntToScalar(20); | 524 SkScalar x = SkIntToScalar(20); |
525 SkScalar y = SkIntToScalar(40); | 525 SkScalar y = SkIntToScalar(40); |
526 SkPaint paint; | 526 SkPaint paint; |
527 | 527 |
528 paint.setAntiAlias(true); | 528 paint.setAntiAlias(true); |
529 paint.setTextSize(SkIntToScalar(48)); | 529 paint.setTextSize(SkIntToScalar(48)); |
530 paint.setTypeface(SkTypeface::CreateFromName("sans-serif", | 530 paint.setTypeface(SkTypeface::MakeFromName("sans-serif", SkTypeface::kBo
ld)); |
531 SkTypeface::kBold)); | |
532 | 531 |
533 SkString str("GOOGLE"); | 532 SkString str("GOOGLE"); |
534 | 533 |
535 for (size_t i = 0; i < SK_ARRAY_COUNT(gRastProcs); i++) { | 534 for (size_t i = 0; i < SK_ARRAY_COUNT(gRastProcs); i++) { |
536 apply_shader(&paint, (int)i); | 535 apply_shader(&paint, (int)i); |
537 | 536 |
538 // paint.setMaskFilter(nullptr); | 537 // paint.setMaskFilter(nullptr); |
539 // paint.setColor(SK_ColorBLACK); | 538 // paint.setColor(SK_ColorBLACK); |
540 | 539 |
541 #if 01 | 540 #if 01 |
(...skipping 18 matching lines...) Expand all Loading... |
560 private: | 559 private: |
561 SkPoint fClickPt; | 560 SkPoint fClickPt; |
562 SkBitmap fBug, fTb, fTx; | 561 SkBitmap fBug, fTb, fTx; |
563 typedef SampleView INHERITED; | 562 typedef SampleView INHERITED; |
564 }; | 563 }; |
565 | 564 |
566 ////////////////////////////////////////////////////////////////////////////// | 565 ////////////////////////////////////////////////////////////////////////////// |
567 | 566 |
568 static SkView* MyFactory() { return new DemoView; } | 567 static SkView* MyFactory() { return new DemoView; } |
569 static SkViewRegister reg(MyFactory); | 568 static SkViewRegister reg(MyFactory); |
OLD | NEW |