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

Side by Side Diff: experimental/webtry/result.cpp

Issue 294903017: Add the ability to select a source image to use in the code. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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
« no previous file with comments | « experimental/webtry/res/js/webtry.js ('k') | experimental/webtry/templates/content.html » ('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 "SkCanvas.h" 1 #include "SkCanvas.h"
2 #include "SkData.h" 2 #include "SkData.h"
3 #include "SkForceLinking.h" 3 #include "SkForceLinking.h"
4 #include "SkGraphics.h" 4 #include "SkGraphics.h"
5 #include "SkImageEncoder.h" 5 #include "SkImageEncoder.h"
6 #include "SkImageInfo.h" 6 #include "SkImageInfo.h"
7 #include "SkStream.h" 7 #include "SkStream.h"
8 #include "SkSurface.h" 8 #include "SkSurface.h"
9 9
10 SkBitmap source;
10 11
11 void draw(SkCanvas* canvas) { 12 void draw(SkCanvas* canvas) {
12 #line 1 13 #line 1
13 SkPaint p; 14 SkPaint p;
14 #line 2 15 #line 2
15 p.setColor(SK_ColorRED); 16 p.setColor(SK_ColorRED);
16 #line 3 17 #line 3
17 p.setAntiAlias(true); 18 p.setAntiAlias(true);
18 #line 4 19 #line 4
19 p.setStyle(SkPaint::kStroke_Style); 20 p.setStyle(SkPaint::kStroke_Style);
20 #line 5 21 #line 5
21 p.setStrokeWidth(10); 22 p.setStrokeWidth(10);
22 #line 6 23 #line 6
23 24
24 #line 7 25 #line 7
25 canvas->drawLine(20, 20, 100, 100, p); 26 canvas->drawLine(20, 20, 100, 100, p);
26 #line 8 27 #line 8
27 28
28 } 29 }
OLDNEW
« no previous file with comments | « experimental/webtry/res/js/webtry.js ('k') | experimental/webtry/templates/content.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698