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

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

Issue 105823004: Update documentation around drawBitmap and shaders (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 | « include/core/SkCanvas.h ('k') | no next file » | 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 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 8
9 #ifndef SkShader_DEFINED 9 #ifndef SkShader_DEFINED
10 #define SkShader_DEFINED 10 #define SkShader_DEFINED
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 327
328 ////////////////////////////////////////////////////////////////////////// 328 //////////////////////////////////////////////////////////////////////////
329 // Factory methods for stock shaders 329 // Factory methods for stock shaders
330 330
331 /** Call this to create a new shader that will draw with the specified bitma p. 331 /** Call this to create a new shader that will draw with the specified bitma p.
332 * 332 *
333 * If the bitmap cannot be used (e.g. has no pixels, or its dimensions 333 * If the bitmap cannot be used (e.g. has no pixels, or its dimensions
334 * exceed implementation limits (currently at 64K - 1)) then SkEmptyShader 334 * exceed implementation limits (currently at 64K - 1)) then SkEmptyShader
335 * may be returned. 335 * may be returned.
336 * 336 *
337 * If the src is kA8_Config then that mask will be colorized using the colo r on
338 * the paint.
339 *
337 * @param src The bitmap to use inside the shader 340 * @param src The bitmap to use inside the shader
338 * @param tmx The tiling mode to use when sampling the bitmap in the x-dir ection. 341 * @param tmx The tiling mode to use when sampling the bitmap in the x-dir ection.
339 * @param tmy The tiling mode to use when sampling the bitmap in the y-dir ection. 342 * @param tmy The tiling mode to use when sampling the bitmap in the y-dir ection.
340 * @return Returns a new shader object. Note: this function never retur ns null. 343 * @return Returns a new shader object. Note: this function never retur ns null.
341 */ 344 */
342 static SkShader* CreateBitmapShader(const SkBitmap& src, 345 static SkShader* CreateBitmapShader(const SkBitmap& src,
343 TileMode tmx, TileMode tmy); 346 TileMode tmx, TileMode tmy);
344 347
345 SkDEVCODE(virtual void toString(SkString* str) const;) 348 SkDEVCODE(virtual void toString(SkString* str) const;)
346 349
(...skipping 24 matching lines...) Expand all
371 SkDEBUGCODE(SkBool8 fInSetContext;) 374 SkDEBUGCODE(SkBool8 fInSetContext;)
372 375
373 static SkShader* CreateBitmapShader(const SkBitmap& src, 376 static SkShader* CreateBitmapShader(const SkBitmap& src,
374 TileMode, TileMode, 377 TileMode, TileMode,
375 void* storage, size_t storageSize); 378 void* storage, size_t storageSize);
376 friend class SkAutoBitmapShaderInstall; 379 friend class SkAutoBitmapShaderInstall;
377 typedef SkFlattenable INHERITED; 380 typedef SkFlattenable INHERITED;
378 }; 381 };
379 382
380 #endif 383 #endif
OLDNEW
« no previous file with comments | « include/core/SkCanvas.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698