Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(85)

Side by Side Diff: samplecode/SampleEffects.cpp

Issue 96099: Whitespace fix: remove whitespace from the end of lines.
Patch Set: Created 16 years, 11 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « samplecode/SampleDrawLooper.cpp ('k') | samplecode/SampleEmboss.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "SampleCode.h" 1 #include "SampleCode.h"
2 #include "SkCanvas.h" 2 #include "SkCanvas.h"
3 #include "SkPaint.h" 3 #include "SkPaint.h"
4 #include "SkView.h" 4 #include "SkView.h"
5 5
6 #include "SkBlurMaskFilter.h" 6 #include "SkBlurMaskFilter.h"
7 #include "SkColorMatrixFilter.h" 7 #include "SkColorMatrixFilter.h"
8 #include "SkDiscretePathEffect.h" 8 #include "SkDiscretePathEffect.h"
9 #include "SkGradientShader.h" 9 #include "SkGradientShader.h"
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 10, 5, 61 10, 5,
62 20, -5, 62 20, -5,
63 10, -15, 63 10, -15,
64 10, -10, 64 10, -10,
65 0, -10 65 0, -10
66 }; 66 };
67 fPath.moveTo(pts[0], pts[1]); 67 fPath.moveTo(pts[0], pts[1]);
68 for (i = 2; i < SK_ARRAY_COUNT(pts); i += 2) { 68 for (i = 2; i < SK_ARRAY_COUNT(pts); i += 2) {
69 fPath.lineTo(pts[i], pts[i+1]); 69 fPath.lineTo(pts[i], pts[i+1]);
70 } 70 }
71 71
72 for (i = 0; i < SK_ARRAY_COUNT(gPaintProcs); i++) { 72 for (i = 0; i < SK_ARRAY_COUNT(gPaintProcs); i++) {
73 fPaint[i].setAntiAlias(true); 73 fPaint[i].setAntiAlias(true);
74 fPaint[i].setColor(COLOR); 74 fPaint[i].setColor(COLOR);
75 gPaintProcs[i](&fPaint[i]); 75 gPaintProcs[i](&fPaint[i]);
76 } 76 }
77 } 77 }
78 78
79 protected: 79 protected:
80 // overrides from SkEventSink 80 // overrides from SkEventSink
81 virtual bool onQuery(SkEvent* evt) { 81 virtual bool onQuery(SkEvent* evt) {
82 if (SampleCode::TitleQ(*evt)) { 82 if (SampleCode::TitleQ(*evt)) {
83 SampleCode::TitleR(evt, "Effects"); 83 SampleCode::TitleR(evt, "Effects");
84 return true; 84 return true;
85 } 85 }
86 return this->INHERITED::onQuery(evt); 86 return this->INHERITED::onQuery(evt);
87 } 87 }
88 88
89 void drawBG(SkCanvas* canvas) { 89 void drawBG(SkCanvas* canvas) {
90 canvas->drawColor(0xFFDDDDDD); 90 canvas->drawColor(0xFFDDDDDD);
91 } 91 }
92 92
93 virtual void onDraw(SkCanvas* canvas) { 93 virtual void onDraw(SkCanvas* canvas) {
94 this->drawBG(canvas); 94 this->drawBG(canvas);
95 95
96 canvas->scale(3, 3); 96 canvas->scale(3, 3);
97 canvas->translate(10, 30); 97 canvas->translate(10, 30);
98 for (size_t i = 0; i < SK_ARRAY_COUNT(fPaint); i++) { 98 for (size_t i = 0; i < SK_ARRAY_COUNT(fPaint); i++) {
99 canvas->drawPath(fPath, fPaint[i]); 99 canvas->drawPath(fPath, fPaint[i]);
100 canvas->translate(32, 0); 100 canvas->translate(32, 0);
101 } 101 }
102 } 102 }
103 103
104 private: 104 private:
105 typedef SkView INHERITED; 105 typedef SkView INHERITED;
106 }; 106 };
107 107
108 /////////////////////////////////////////////////////////////////////////////// 108 ///////////////////////////////////////////////////////////////////////////////
109 109
110 static SkView* MyFactory() { return new EffectsView; } 110 static SkView* MyFactory() { return new EffectsView; }
111 static SkViewRegister reg(MyFactory); 111 static SkViewRegister reg(MyFactory);
112 112
OLDNEW
« no previous file with comments | « samplecode/SampleDrawLooper.cpp ('k') | samplecode/SampleEmboss.cpp » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b