| 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 * Apply the specified filter to this image, and return the result as a new
image. | 308 * Apply the specified filter to this image, and return the result as a new
image. |
| 309 * | 309 * |
| 310 * if forceResultToOriginalSize is true, then the resulting image will be t
he same size as the | 310 * if forceResultToOriginalSize is true, then the resulting image will be t
he same size as the |
| 311 * src, regardless of the normal output of the filter. | 311 * src, regardless of the normal output of the filter. |
| 312 * | 312 * |
| 313 * If offset is non-null, it is set to the relative offset needed to draw t
he resulting image | 313 * If offset is non-null, it is set to the relative offset needed to draw t
he resulting image |
| 314 * in the same logical place as the original. | 314 * in the same logical place as the original. |
| 315 * | 315 * |
| 316 * e.g. | 316 * e.g. |
| 317 * If the filter makes the result larger by a margin of 4 the output wo
uld be: | 317 * If the filter makes the result larger by a margin of 4 the output wo
uld be: |
| 318 * result->width() = this->width + 8 | 318 * result->width() == this->width + 8 |
| 319 * result->height() = this->height + 8 | 319 * result->height() == this->height + 8 |
| 320 * offset.x() == -4 | 320 * offset.x() == -4 |
| 321 * offset.y() == -4 | 321 * offset.y() == -4 |
| 322 * | 322 * |
| 323 * If the filter fails to create a resulting image, null is returned, and t
he offset parameter | 323 * If the filter fails to create a resulting image, null is returned, and t
he offset parameter |
| 324 * (if specified) will be undefined. | 324 * (if specified) will be undefined. |
| 325 */ | 325 */ |
| 326 SkImage* applyFilter(SkImageFilter* filter, SkIPoint* offset, | 326 SkImage* applyFilter(SkImageFilter* filter, SkIPoint* offset, |
| 327 bool forceResultToOriginalSize) const; | 327 bool forceResultToOriginalSize) const; |
| 328 | 328 |
| 329 protected: | 329 protected: |
| 330 SkImage(int width, int height, uint32_t uniqueID); | 330 SkImage(int width, int height, uint32_t uniqueID); |
| 331 | 331 |
| 332 private: | 332 private: |
| 333 const int fWidth; | 333 const int fWidth; |
| 334 const int fHeight; | 334 const int fHeight; |
| 335 const uint32_t fUniqueID; | 335 const uint32_t fUniqueID; |
| 336 | 336 |
| 337 typedef SkRefCnt INHERITED; | 337 typedef SkRefCnt INHERITED; |
| 338 }; | 338 }; |
| 339 | 339 |
| 340 #endif | 340 #endif |
| OLD | NEW |