diff options
author | rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-23 18:19:56 +0000 |
---|---|---|
committer | rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-23 18:19:56 +0000 |
commit | ae933ce0ea5fd9d21cb6ef2cee7e729d32690aac (patch) | |
tree | 62d80e33b16679d01454cf814977a7030d3a5462 /samplecode/SampleClip.cpp | |
parent | d6176b0dcacb124539e0cfd051e6d93a9782f020 (diff) |
Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)
This CL is part III of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6475053
git-svn-id: http://skia.googlecode.com/svn/trunk@5264 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode/SampleClip.cpp')
-rw-r--r-- | samplecode/SampleClip.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/samplecode/SampleClip.cpp b/samplecode/SampleClip.cpp index 6695c62539..ce3736ef98 100644 --- a/samplecode/SampleClip.cpp +++ b/samplecode/SampleClip.cpp @@ -22,7 +22,7 @@ static void show_text(SkCanvas* canvas, bool doAA) { paint.setAntiAlias(doAA); paint.setLCDRenderText(true); paint.setTextSize(SkIntToScalar(20)); - + for (int i = 0; i < 200; ++i) { paint.setColor((SK_A32_MASK << SK_A32_SHIFT) | rand.nextU()); canvas->drawText("Hamburgefons", 12, @@ -35,16 +35,16 @@ static void show_fill(SkCanvas* canvas, bool doAA) { SkRandom rand; SkPaint paint; paint.setAntiAlias(doAA); - + for (int i = 0; i < 50; ++i) { SkRect r; SkPath p; - + r.setXYWH(rand.nextSScalar1() * W, rand.nextSScalar1() * H, rand.nextUScalar1() * W, rand.nextUScalar1() * H); paint.setColor(rand.nextU()); canvas->drawRect(r, paint); - + r.setXYWH(rand.nextSScalar1() * W, rand.nextSScalar1() * H, rand.nextUScalar1() * W, rand.nextUScalar1() * H); paint.setColor(rand.nextU()); @@ -64,16 +64,16 @@ static void show_stroke(SkCanvas* canvas, bool doAA, SkScalar strokeWidth, int n paint.setAntiAlias(doAA); paint.setStyle(SkPaint::kStroke_Style); paint.setStrokeWidth(strokeWidth); - + for (int i = 0; i < n; ++i) { SkRect r; SkPath p; - + r.setXYWH(rand.nextSScalar1() * W, rand.nextSScalar1() * H, rand.nextUScalar1() * W, rand.nextUScalar1() * H); paint.setColor(rand.nextU()); canvas->drawRect(r, paint); - + r.setXYWH(rand.nextSScalar1() * W, rand.nextSScalar1() * H, rand.nextUScalar1() * W, rand.nextUScalar1() * H); paint.setColor(rand.nextU()); @@ -131,7 +131,7 @@ protected: static const CanvasProc gProc[] = { show_text, show_thick, show_hair, show_fill }; - + SkRect r = { 0, 0, SkIntToScalar(W), SkIntToScalar(H) }; SkPath clipPath; r.inset(SK_Scalar1 / 4, SK_Scalar1 / 4); @@ -153,7 +153,7 @@ protected: canvas->translate(0, H * SK_Scalar1 * 8 / 7); } } - + private: typedef SampleView INHERITED; }; |