OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 SkImage_DEFINED | 8 #ifndef SkImage_DEFINED |
9 #define SkImage_DEFINED | 9 #define SkImage_DEFINED |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
51 int height() const { return fHeight; } | 51 int height() const { return fHeight; } |
52 uint32_t uniqueID() const { return fUniqueID; } | 52 uint32_t uniqueID() const { return fUniqueID; } |
53 | 53 |
54 /** | 54 /** |
55 * Return the GrTexture that stores the image pixels. Calling getTexture | 55 * Return the GrTexture that stores the image pixels. Calling getTexture |
56 * does not affect the reference count of the GrTexture object. | 56 * does not affect the reference count of the GrTexture object. |
57 * Will return NULL if the image does not use a texture. | 57 * Will return NULL if the image does not use a texture. |
58 */ | 58 */ |
59 GrTexture* getTexture(); | 59 GrTexture* getTexture(); |
60 | 60 |
61 virtual SkShader* newShader(SkShader::TileMode, SkShader::TileMode) const; | 61 virtual SkShader* newShader(SkShader::TileMode, SkShader::TileMode, SkMatrix * localMatrix = NULL) const; |
Justin Novosad
2014/07/21 19:20:39
Should be 'const'
bsalomon
2014/07/21 19:28:41
Also, should wrap to be <= 100 cols.
Rémi Piotaix
2014/07/22 19:08:08
Done.
Rémi Piotaix
2014/07/22 19:08:08
Done.
| |
62 | 62 |
63 void draw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*); | 63 void draw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*); |
64 | 64 |
65 /** | 65 /** |
66 * Draw the image, cropped to the src rect, to the dst rect of a canvas. | 66 * Draw the image, cropped to the src rect, to the dst rect of a canvas. |
67 * If src is larger than the bounds of the image, the rest of the image is | 67 * If src is larger than the bounds of the image, the rest of the image is |
68 * filled with transparent black pixels. | 68 * filled with transparent black pixels. |
69 * | 69 * |
70 * See SkCanvas::drawBitmapRectToRect for similar behavior. | 70 * See SkCanvas::drawBitmapRectToRect for similar behavior. |
71 */ | 71 */ |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
129 * On failure, false will be returned, and bitmap will unmodified. | 129 * On failure, false will be returned, and bitmap will unmodified. |
130 */ | 130 */ |
131 // On ice for now: | 131 // On ice for now: |
132 // - should it respect the particular colortype/alphatype of the src | 132 // - should it respect the particular colortype/alphatype of the src |
133 // - should it have separate entrypoints for preallocated and not bitmaps? | 133 // - should it have separate entrypoints for preallocated and not bitmaps? |
134 // - isn't it enough to allow the caller to draw() the image into a canvas? | 134 // - isn't it enough to allow the caller to draw() the image into a canvas? |
135 bool readPixels(SkBitmap* bitmap, const SkIRect* subset = NULL) const; | 135 bool readPixels(SkBitmap* bitmap, const SkIRect* subset = NULL) const; |
136 }; | 136 }; |
137 | 137 |
138 #endif | 138 #endif |
OLD | NEW |