Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(944)

Side by Side Diff: samplecode/SampleRectanizer.cpp

Issue 1842753002: Style bikeshed - remove extraneous whitespace (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « samplecode/SampleQuadStroker.cpp ('k') | samplecode/SampleRepeatTile.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 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 7
8 #include "gm.h" 8 #include "gm.h"
9 #include "SampleCode.h" 9 #include "SampleCode.h"
10 #include "SkRandom.h" 10 #include "SkRandom.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 SkPaint redFill; 93 SkPaint redFill;
94 redFill.setColor(SK_ColorRED); 94 redFill.setColor(SK_ColorRED);
95 95
96 SkRect r = SkRect::MakeWH(SkIntToScalar(kWidth), SkIntToScalar(kHeight)) ; 96 SkRect r = SkRect::MakeWH(SkIntToScalar(kWidth), SkIntToScalar(kHeight)) ;
97 97
98 canvas->clear(SK_ColorWHITE); 98 canvas->clear(SK_ColorWHITE);
99 canvas->drawRect(r, blackStroke); 99 canvas->drawRect(r, blackStroke);
100 100
101 long totArea = 0; 101 long totArea = 0;
102 for (int i = 0; i < fCurRandRect; ++i) { 102 for (int i = 0; i < fCurRandRect; ++i) {
103 r = SkRect::MakeXYWH(SkIntToScalar(fRectLocations[i].fX), 103 r = SkRect::MakeXYWH(SkIntToScalar(fRectLocations[i].fX),
104 SkIntToScalar(fRectLocations[i].fY), 104 SkIntToScalar(fRectLocations[i].fY),
105 SkIntToScalar((*fCurRects)[i].fWidth), 105 SkIntToScalar((*fCurRects)[i].fWidth),
106 SkIntToScalar((*fCurRects)[i].fHeight)); 106 SkIntToScalar((*fCurRects)[i].fHeight));
107 canvas->drawRect(r, redFill); 107 canvas->drawRect(r, redFill);
108 canvas->drawRect(r, blackStroke); 108 canvas->drawRect(r, blackStroke);
109 totArea += (*fCurRects)[i].fWidth * (*fCurRects)[i].fHeight; 109 totArea += (*fCurRects)[i].fWidth * (*fCurRects)[i].fHeight;
110 } 110 }
111 111
112 SkString str; 112 SkString str;
113 113
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 } 189 }
190 190
191 typedef SampleView INHERITED; 191 typedef SampleView INHERITED;
192 }; 192 };
193 193
194 ////////////////////////////////////////////////////////////////////////////// 194 //////////////////////////////////////////////////////////////////////////////
195 static SkView* MyFactory() { return new RectanizerView; } 195 static SkView* MyFactory() { return new RectanizerView; }
196 static SkViewRegister reg(MyFactory); 196 static SkViewRegister reg(MyFactory);
197 197
198 #endif 198 #endif
OLDNEW
« no previous file with comments | « samplecode/SampleQuadStroker.cpp ('k') | samplecode/SampleRepeatTile.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698