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

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

Issue 1114243005: remove (redundant) twopointradial shader (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « gyp/gmslides.gypi ('k') | include/effects/SkGradientShader.h » ('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 * 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 // by matrix. No extras 239 // by matrix. No extras
240 kRadial_BitmapType, //<! Access bitmap by transforming local coordinates 240 kRadial_BitmapType, //<! Access bitmap by transforming local coordinates
241 // by the matrix and taking the distance of result 241 // by the matrix and taking the distance of result
242 // from (0,0) as bitmap column. Bitmap is 1 pixel 242 // from (0,0) as bitmap column. Bitmap is 1 pixel
243 // tall. No extras 243 // tall. No extras
244 kSweep_BitmapType, //<! Access bitmap by transforming local coordinates 244 kSweep_BitmapType, //<! Access bitmap by transforming local coordinates
245 // by the matrix and taking the angle of result 245 // by the matrix and taking the angle of result
246 // to (0,0) as bitmap x coord, where angle = 0 is 246 // to (0,0) as bitmap x coord, where angle = 0 is
247 // bitmap left edge of bitmap = 2pi is the 247 // bitmap left edge of bitmap = 2pi is the
248 // right edge. Bitmap is 1 pixel tall. No extras 248 // right edge. Bitmap is 1 pixel tall. No extras
249 kTwoPointRadial_BitmapType,
250 //<! Matrix transforms to space where (0,0) is
251 // the center of the starting circle. The second
252 // circle will be centered (x, 0) where x may be
253 // 0. The post-matrix space is normalized such
254 // that 1 is the second radius - first radius.
255 // Three extra parameters are returned:
256 // 0: x-offset of second circle center
257 // to first.
258 // 1: radius of first circle in post-matrix
259 // space
260 // 2: the second radius minus the first radius
261 // in pre-transformed space.
262 kTwoPointConical_BitmapType, 249 kTwoPointConical_BitmapType,
263 //<! Matrix transforms to space where (0,0) is 250 //<! Matrix transforms to space where (0,0) is
264 // the center of the starting circle. The second 251 // the center of the starting circle. The second
265 // circle will be centered (x, 0) where x may be 252 // circle will be centered (x, 0) where x may be
266 // 0. 253 // 0.
267 // Three extra parameters are returned: 254 // Three extra parameters are returned:
268 // 0: x-offset of second circle center 255 // 0: x-offset of second circle center
269 // to first. 256 // to first.
270 // 1: radius of first circle 257 // 1: radius of first circle
271 // 2: the second radius minus the first radius 258 // 2: the second radius minus the first radius
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 * The meaning of fPoint and fRadius is dependant on the type of gradient. 294 * The meaning of fPoint and fRadius is dependant on the type of gradient.
308 * 295 *
309 * None: 296 * None:
310 * info is ignored. 297 * info is ignored.
311 * Color: 298 * Color:
312 * fColorOffsets[0] is meaningless. 299 * fColorOffsets[0] is meaningless.
313 * Linear: 300 * Linear:
314 * fPoint[0] and fPoint[1] are the end-points of the gradient 301 * fPoint[0] and fPoint[1] are the end-points of the gradient
315 * Radial: 302 * Radial:
316 * fPoint[0] and fRadius[0] are the center and radius 303 * fPoint[0] and fRadius[0] are the center and radius
317 * Radial2: 304 * Conical:
318 * fPoint[0] and fRadius[0] are the center and radius of the 1st circle 305 * fPoint[0] and fRadius[0] are the center and radius of the 1st circle
319 * fPoint[1] and fRadius[1] are the center and radius of the 2nd circle 306 * fPoint[1] and fRadius[1] are the center and radius of the 2nd circle
320 * Sweep: 307 * Sweep:
321 * fPoint[0] is the center of the sweep. 308 * fPoint[0] is the center of the sweep.
322 */ 309 */
323 310
324 enum GradientType { 311 enum GradientType {
325 kNone_GradientType, 312 kNone_GradientType,
326 kColor_GradientType, 313 kColor_GradientType,
327 kLinear_GradientType, 314 kLinear_GradientType,
328 kRadial_GradientType, 315 kRadial_GradientType,
329 kRadial2_GradientType,
330 kSweep_GradientType, 316 kSweep_GradientType,
331 kConical_GradientType, 317 kConical_GradientType,
332 kLast_GradientType = kConical_GradientType 318 kLast_GradientType = kConical_GradientType
333 }; 319 };
334 320
335 struct GradientInfo { 321 struct GradientInfo {
336 int fColorCount; //!< In-out parameter, specifies passed size 322 int fColorCount; //!< In-out parameter, specifies passed size
337 // of fColors/fColorOffsets on input, and 323 // of fColors/fColorOffsets on input, and
338 // actual number of colors/offsets on 324 // actual number of colors/offsets on
339 // output. 325 // output.
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 // constructors. 480 // constructors.
495 SkMatrix fLocalMatrix; 481 SkMatrix fLocalMatrix;
496 482
497 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con structor. 483 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con structor.
498 friend class SkLocalMatrixShader; 484 friend class SkLocalMatrixShader;
499 485
500 typedef SkFlattenable INHERITED; 486 typedef SkFlattenable INHERITED;
501 }; 487 };
502 488
503 #endif 489 #endif
OLDNEW
« no previous file with comments | « gyp/gmslides.gypi ('k') | include/effects/SkGradientShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698