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

Side by Side Diff: gm/conicpaths.cpp

Issue 17419010: Change window size on GM to fit objects properly (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 2013 Google Inc. 2 * Copyright 2013 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 "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkTArray.h" 10 #include "SkTArray.h"
11 11
12 namespace skiagm { 12 namespace skiagm {
13 13
14 class ConicPathsGM : public GM { 14 class ConicPathsGM : public GM {
15 protected: 15 protected:
16 16
17 virtual SkString onShortName() SK_OVERRIDE { 17 virtual SkString onShortName() SK_OVERRIDE {
18 return SkString("conicpaths"); 18 return SkString("conicpaths");
19 } 19 }
20 20
21 virtual SkISize onISize() SK_OVERRIDE { 21 virtual SkISize onISize() SK_OVERRIDE {
22 return SkISize::Make(800, 600); 22 return SkISize::Make(1000, 1000);
23 } 23 }
24 24
25 virtual void onOnceBeforeDraw() SK_OVERRIDE { 25 virtual void onOnceBeforeDraw() SK_OVERRIDE {
26 { 26 {
27 SkPath* conicCirlce = &fPaths.push_back(); 27 SkPath* conicCirlce = &fPaths.push_back();
28 conicCirlce->moveTo(0, -0); 28 conicCirlce->moveTo(0, -0);
29 conicCirlce->conicTo(SkIntToScalar(0), SkIntToScalar(50), 29 conicCirlce->conicTo(SkIntToScalar(0), SkIntToScalar(50),
30 SkIntToScalar(50), SkIntToScalar(50), 30 SkIntToScalar(50), SkIntToScalar(50),
31 SkScalarHalf(SkScalarSqrt(2))); 31 SkScalarHalf(SkScalarSqrt(2)));
32 conicCirlce->rConicTo(SkIntToScalar(50), SkIntToScalar(0), 32 conicCirlce->rConicTo(SkIntToScalar(50), SkIntToScalar(0),
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 private: 160 private:
161 SkTArray<SkPath> fPaths; 161 SkTArray<SkPath> fPaths;
162 typedef GM INHERITED; 162 typedef GM INHERITED;
163 }; 163 };
164 164
165 ////////////////////////////////////////////////////////////////////////////// 165 //////////////////////////////////////////////////////////////////////////////
166 166
167 DEF_GM( return SkNEW(ConicPathsGM); ) 167 DEF_GM( return SkNEW(ConicPathsGM); )
168 } 168 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698