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

Side by Side Diff: gm/strokerect.cpp

Issue 2126723002: Enlarge strokerect GM size to reveal hidden content (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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 | « 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 2012 Google Inc. 2 * Copyright 2012 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 "SkPath.h" 10 #include "SkPath.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 public: 45 public:
46 StrokeRectGM() {} 46 StrokeRectGM() {}
47 47
48 protected: 48 protected:
49 49
50 SkString onShortName() override { 50 SkString onShortName() override {
51 return SkString("strokerect"); 51 return SkString("strokerect");
52 } 52 }
53 53
54 SkISize onISize() override { 54 SkISize onISize() override {
55 return SkISize::Make(1024, 740); 55 return SkISize::Make(1400, 740);
56 } 56 }
57 57
58 void onDraw(SkCanvas* canvas) override { 58 void onDraw(SkCanvas* canvas) override {
59 canvas->drawColor(SK_ColorWHITE); 59 canvas->drawColor(SK_ColorWHITE);
60 canvas->translate(STROKE_WIDTH*3/2, STROKE_WIDTH*3/2); 60 canvas->translate(STROKE_WIDTH*3/2, STROKE_WIDTH*3/2);
61 61
62 SkPaint paint; 62 SkPaint paint;
63 paint.setStyle(SkPaint::kStroke_Style); 63 paint.setStyle(SkPaint::kStroke_Style);
64 paint.setStrokeWidth(STROKE_WIDTH); 64 paint.setStrokeWidth(STROKE_WIDTH);
65 65
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 */ 120 */
121 DEF_SIMPLE_GM(strokerect_anisotropic_5408, canvas, 200, 50) { 121 DEF_SIMPLE_GM(strokerect_anisotropic_5408, canvas, 200, 50) {
122 SkPaint p; 122 SkPaint p;
123 p.setStyle(SkPaint::kStroke_Style); 123 p.setStyle(SkPaint::kStroke_Style);
124 p.setStrokeWidth(6); 124 p.setStrokeWidth(6);
125 125
126 canvas->scale(10, 1); 126 canvas->scale(10, 1);
127 SkRect r = SkRect::MakeXYWH(5, 20, 10, 10); 127 SkRect r = SkRect::MakeXYWH(5, 20, 10, 10);
128 canvas->drawRect(r, p); 128 canvas->drawRect(r, p);
129 } 129 }
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