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

Side by Side Diff: include/core/SkDrawable.h

Issue 1224783002: add matrix options to drawDrawable (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: modify gm Created 5 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 SkDrawable_DEFINED 8 #ifndef SkDrawable_DEFINED
9 #define SkDrawable_DEFINED 9 #define SkDrawable_DEFINED
10 10
(...skipping 12 matching lines...) Expand all
23 */ 23 */
24 class SkDrawable : public SkRefCnt { 24 class SkDrawable : public SkRefCnt {
25 public: 25 public:
26 SkDrawable(); 26 SkDrawable();
27 27
28 /** 28 /**
29 * Draws into the specified content. The drawing sequence will be balanced upon return 29 * Draws into the specified content. The drawing sequence will be balanced upon return
30 * (i.e. the saveLevel() on the canvas will match what it was when draw() w as called, 30 * (i.e. the saveLevel() on the canvas will match what it was when draw() w as called,
31 * and the current matrix and clip settings will not be changed. 31 * and the current matrix and clip settings will not be changed.
32 */ 32 */
33 void draw(SkCanvas*); 33 void draw(SkCanvas*, const SkMatrix* = NULL);
34 void draw(SkCanvas*, SkScalar x, SkScalar y);
34 35
35 SkPicture* newPictureSnapshot(); 36 SkPicture* newPictureSnapshot();
36 37
37 /** 38 /**
38 * Return a unique value for this instance. If two calls to this return the same value, 39 * Return a unique value for this instance. If two calls to this return the same value,
39 * it is presumed that calling the draw() method will render the same thing as well. 40 * it is presumed that calling the draw() method will render the same thing as well.
40 * 41 *
41 * Subclasses that change their state should call notifyDrawingChanged() to ensure that 42 * Subclasses that change their state should call notifyDrawingChanged() to ensure that
42 * a new value will be returned the next time it is called. 43 * a new value will be returned the next time it is called.
43 */ 44 */
(...skipping 23 matching lines...) Expand all
67 * of their drawable. Note: this picture must draw the same as what would b e drawn from 68 * of their drawable. Note: this picture must draw the same as what would b e drawn from
68 * onDraw(). 69 * onDraw().
69 */ 70 */
70 virtual SkPicture* onNewPictureSnapshot(); 71 virtual SkPicture* onNewPictureSnapshot();
71 72
72 private: 73 private:
73 int32_t fGenerationID; 74 int32_t fGenerationID;
74 }; 75 };
75 76
76 #endif 77 #endif
OLDNEW
« no previous file with comments | « include/core/SkCanvas.h ('k') | src/core/SkCanvas.cpp » ('j') | src/core/SkRecords.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698