| OLD | NEW |
| 1 SkPaint | 1 SkPaint |
| 2 ======= | 2 ======= |
| 3 | 3 |
| 4 *color, stroke, font, effects* | 4 *color, stroke, font, effects* |
| 5 | 5 |
| 6 - [SkXfermode](#SkXfermode) - transfer modes | 6 - [SkXfermode](#SkXfermode) - transfer modes |
| 7 - [ShShader](#ShShader) - gradients and patterns | 7 - [ShShader](#ShShader) - gradients and patterns |
| 8 - [SkMaskFilter](#SkMaskFilter) - modifications to the alpha mask | 8 - [SkMaskFilter](#SkMaskFilter) - modifications to the alpha mask |
| 9 - [SkColorFilter](#SkColorFilter) - modify the source color before applying th
e | 9 - [SkColorFilter](#SkColorFilter) - modify the source color before applying th
e |
| 10 - [SkPathEffect](#SkPathEffect) - modify to the geometry before it | 10 - [SkPathEffect](#SkPathEffect) - modify to the geometry before it |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 <!--?prettify lang=cc?--> | 26 <!--?prettify lang=cc?--> |
| 27 | 27 |
| 28 void draw(SkCanvas* canvas) { | 28 void draw(SkCanvas* canvas) { |
| 29 canvas->clear(SK_ColorWHITE); | 29 canvas->clear(SK_ColorWHITE); |
| 30 | 30 |
| 31 SkPaint paint1, paint2, paint3; | 31 SkPaint paint1, paint2, paint3; |
| 32 | 32 |
| 33 paint1.setTextSize(64.0f); | 33 paint1.setTextSize(64.0f); |
| 34 paint1.setAntiAlias(true); | 34 paint1.setAntiAlias(true); |
| 35 paint1.setColor(SkColorSetRGB(255, 0, 0); | 35 paint1.setColor(SkColorSetRGB(255, 0, 0)); |
| 36 paint1.setStyle(SkPaint::kFill_Style); | 36 paint1.setStyle(SkPaint::kFill_Style); |
| 37 | 37 |
| 38 paint2.setTextSize(64.f); | 38 paint2.setTextSize(64.f); |
| 39 paint2.setAntiAlias(true); | 39 paint2.setAntiAlias(true); |
| 40 paint2.setColor(SkColorSetRGB(0, 136, 0); | 40 paint2.setColor(SkColorSetRGB(0, 136, 0)); |
| 41 paint2.setStyle(SkPaint::kStroke_Style); | 41 paint2.setStyle(SkPaint::kStroke_Style); |
| 42 paint2.setStrokeWidth(SkIntToScalar(3)); | 42 paint2.setStrokeWidth(SkIntToScalar(3)); |
| 43 | 43 |
| 44 paint3.setTextSize(64.0f); | 44 paint3.setTextSize(64.0f); |
| 45 paint3.setAntiAlias(true); | 45 paint3.setAntiAlias(true); |
| 46 paint3.setColor(SkColorSetRGB(136, 136, 136)); | 46 paint3.setColor(SkColorSetRGB(136, 136, 136)); |
| 47 paint3.setTextScaleX(SkFloatToScalar(1.5f)); | 47 paint3.setTextScaleX(SkFloatToScalar(1.5f)); |
| 48 | 48 |
| 49 const char text[] = "Skia!"; | 49 const char text[] = "Skia!"; |
| 50 canvas->drawText(text, strlen(text), 20.0f, 64.0f, paint1); | 50 canvas->drawText(text, strlen(text), 20.0f, 64.0f, paint1); |
| (...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 paint.setStrokeWidth(2.0f); | 688 paint.setStrokeWidth(2.0f); |
| 689 paint.setAntiAlias(true); | 689 paint.setAntiAlias(true); |
| 690 canvas->clear(SK_ColorWHITE); | 690 canvas->clear(SK_ColorWHITE); |
| 691 SkPath path(star()); | 691 SkPath path(star()); |
| 692 canvas->drawPath(path, paint); | 692 canvas->drawPath(path, paint); |
| 693 } | 693 } |
| 694 | 694 |
| 695 <a href='https://fiddle.skia.org/c/@skpaint_sum_path_effect'><img | 695 <a href='https://fiddle.skia.org/c/@skpaint_sum_path_effect'><img |
| 696 src='https://fiddle.skia.org/i/@skpaint_sum_path_effect_raster.png'></a> | 696 src='https://fiddle.skia.org/i/@skpaint_sum_path_effect_raster.png'></a> |
| 697 | 697 |
| OLD | NEW |