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

Side by Side Diff: gm/smallarc.cpp

Issue 558163005: thick stroke Beziers (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix bench Created 6 years, 2 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 | « gm/beziers.cpp ('k') | gyp/bench.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2014 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #include "gm.h"
9
10 namespace skiagm {
11
12 // this draws a small arc scaled up
13 // see https://code.google.com/p/chromium/issues/detail?id=102411
14 // and https://code.google.com/p/skia/issues/detail?id=2769
15 class SmallArcGM : public GM {
16 public:
17 SmallArcGM() {
18 }
19
20 protected:
21
22 virtual SkString onShortName() SK_OVERRIDE {
23 return SkString("smallarc");
24 }
25
26 virtual SkISize onISize() SK_OVERRIDE {
27 return SkISize::Make(762, 762);
28 }
29
30 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
31 SkPaint p;
32 p.setColor(SK_ColorRED);
33 p.setAntiAlias(true);
34 p.setStyle(SkPaint::kStroke_Style);
35 p.setStrokeWidth(120);
36
37 SkPath path;
38 path.moveTo(75, 0);
39 path.cubicTo(33.5, 0, 0, 33.5, 0, 75);
40
41 canvas->translate(-400, -400);
42 canvas->scale(8, 8);
43 canvas->drawPath(path, p);
44 }
45
46 private:
47 typedef GM INHERITED;
48 };
49
50 //////////////////////////////////////////////////////////////////////////////
51
52 DEF_GM( return SkNEW(SmallArcGM); )
53
54 }
OLDNEW
« no previous file with comments | « gm/beziers.cpp ('k') | gyp/bench.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698