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

Side by Side Diff: tools/sk_tool_utils.h

Issue 2142033002: Factor code to rotate a canvas about a point. (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
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 #ifndef sk_tool_utils_DEFINED 8 #ifndef sk_tool_utils_DEFINED
9 #define sk_tool_utils_DEFINED 9 #define sk_tool_utils_DEFINED
10 10
11 #include "SkColor.h" 11 #include "SkColor.h"
12 #include "SkImageEncoder.h" 12 #include "SkImageEncoder.h"
13 #include "SkImageInfo.h" 13 #include "SkImageInfo.h"
14 #include "SkPixelSerializer.h" 14 #include "SkPixelSerializer.h"
15 #include "SkRandom.h" 15 #include "SkRandom.h"
16 #include "SkTDArray.h" 16 #include "SkTDArray.h"
17 #include "SkTypeface.h" 17 #include "SkTypeface.h"
18 18
19 class SkBitmap; 19 class SkBitmap;
20 class SkCanvas; 20 class SkCanvas;
21 class SkPaint; 21 class SkPaint;
22 class SkPath; 22 class SkPath;
23 class SkShader; 23 class SkShader;
24 class SkTestFont; 24 class SkTestFont;
25 class SkTextBlobBuilder; 25 class SkTextBlobBuilder;
26 26
27 namespace sk_tool_utils { 27 namespace sk_tool_utils {
28 28
29 /** Rotate the canvas around the given point. */
30 void rotate_about(SkCanvas* canvas, SkScalar degrees, SkScalar px, SkScalar py);
31
29 const char* colortype_name(SkColorType); 32 const char* colortype_name(SkColorType);
30 33
31 /** 34 /**
32 * Map opaque colors from 8888 to 565. 35 * Map opaque colors from 8888 to 565.
33 */ 36 */
34 SkColor color_to_565(SkColor color); 37 SkColor color_to_565(SkColor color);
35 38
36 /** 39 /**
37 * Return a color emoji typeface if available. 40 * Return a color emoji typeface if available.
38 */ 41 */
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 int fID; 219 int fID;
217 int fOutputPos; 220 int fOutputPos;
218 bool fTempMark; 221 bool fTempMark;
219 222
220 SkTDArray<TopoTestNode*> fDependencies; 223 SkTDArray<TopoTestNode*> fDependencies;
221 }; 224 };
222 225
223 } // namespace sk_tool_utils 226 } // namespace sk_tool_utils
224 227
225 #endif // sk_tool_utils_DEFINED 228 #endif // sk_tool_utils_DEFINED
OLDNEW
« gm/strokes.cpp ('K') | « samplecode/SampleHT.cpp ('k') | tools/sk_tool_utils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698