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: include/core/SkCanvas.h

Issue 137833016: add SkCanvas constructor that explicitly creates no_config with dimensions (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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 | src/core/SkCanvas.cpp » ('j') | 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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkCanvas_DEFINED 10 #ifndef SkCanvas_DEFINED
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 While the Canvas holds the state of the drawing device, the state (style) 42 While the Canvas holds the state of the drawing device, the state (style)
43 of the object being drawn is held by the Paint, which is provided as a 43 of the object being drawn is held by the Paint, which is provided as a
44 parameter to each of the draw() methods. The Paint holds attributes such as 44 parameter to each of the draw() methods. The Paint holds attributes such as
45 color, typeface, textSize, strokeWidth, shader (e.g. gradients, patterns), 45 color, typeface, textSize, strokeWidth, shader (e.g. gradients, patterns),
46 etc. 46 etc.
47 */ 47 */
48 class SK_API SkCanvas : public SkRefCnt { 48 class SK_API SkCanvas : public SkRefCnt {
49 public: 49 public:
50 SK_DECLARE_INST_COUNT(SkCanvas) 50 SK_DECLARE_INST_COUNT(SkCanvas)
51 51
52 /**
53 * Creates an empty canvas with no backing device/pixels, and zero
54 * dimensions.
55 */
52 SkCanvas(); 56 SkCanvas();
53 57
58 /**
59 * Creates a canvas of the specified dimensions, but explicitly not backed
60 * by any device/pixels. Typically this use used by subclasses who handle
61 * the draw calls in some other way.
62 */
63 SkCanvas(int width, int height);
64
54 /** Construct a canvas with the specified device to draw into. 65 /** Construct a canvas with the specified device to draw into.
55 66
56 @param device Specifies a device for the canvas to draw into. 67 @param device Specifies a device for the canvas to draw into.
57 */ 68 */
58 explicit SkCanvas(SkBaseDevice* device); 69 explicit SkCanvas(SkBaseDevice* device);
59 70
60 /** Construct a canvas with the specified bitmap to draw into. 71 /** Construct a canvas with the specified bitmap to draw into.
61 @param bitmap Specifies a bitmap for the canvas to draw into. Its 72 @param bitmap Specifies a bitmap for the canvas to draw into. Its
62 structure are copied to the canvas. 73 structure are copied to the canvas.
63 */ 74 */
(...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 fCanvas->endCommentGroup(); 1197 fCanvas->endCommentGroup();
1187 } 1198 }
1188 } 1199 }
1189 1200
1190 private: 1201 private:
1191 SkCanvas* fCanvas; 1202 SkCanvas* fCanvas;
1192 }; 1203 };
1193 #define SkAutoCommentBlock(...) SK_REQUIRE_LOCAL_VAR(SkAutoCommentBlock) 1204 #define SkAutoCommentBlock(...) SK_REQUIRE_LOCAL_VAR(SkAutoCommentBlock)
1194 1205
1195 #endif 1206 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698