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

Side by Side Diff: src/effects/gradients/SkSweepGradient.cpp

Issue 461643002: add localMatrix to gradient Descriptor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkSweepGradient.h" 9 #include "SkSweepGradient.h"
10 10
11 SkSweepGradient::SkSweepGradient(SkScalar cx, SkScalar cy, 11 SkSweepGradient::SkSweepGradient(SkScalar cx, SkScalar cy, const Descriptor& des c)
12 const Descriptor& desc, const SkMatrix* localMa trix) 12 : SkGradientShaderBase(desc)
13 : SkGradientShaderBase(desc, localMatrix)
14 , fCenter(SkPoint::Make(cx, cy)) 13 , fCenter(SkPoint::Make(cx, cy))
15 { 14 {
16 fPtsToUnit.setTranslate(-cx, -cy); 15 fPtsToUnit.setTranslate(-cx, -cy);
17 16
18 // overwrite the tilemode to a canonical value (since sweep ignores it) 17 // overwrite the tilemode to a canonical value (since sweep ignores it)
19 fTileMode = SkShader::kClamp_TileMode; 18 fTileMode = SkShader::kClamp_TileMode;
20 } 19 }
21 20
22 SkShader::BitmapType SkSweepGradient::asABitmap(SkBitmap* bitmap, 21 SkShader::BitmapType SkSweepGradient::asABitmap(SkBitmap* bitmap,
23 SkMatrix* matrix, SkShader::TileMode* xy) const { 22 SkMatrix* matrix, SkShader::TileMode* xy) const {
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 str->appendScalar(fCenter.fX); 322 str->appendScalar(fCenter.fX);
324 str->append(", "); 323 str->append(", ");
325 str->appendScalar(fCenter.fY); 324 str->appendScalar(fCenter.fY);
326 str->append(") "); 325 str->append(") ");
327 326
328 this->INHERITED::toString(str); 327 this->INHERITED::toString(str);
329 328
330 str->append(")"); 329 str->append(")");
331 } 330 }
332 #endif 331 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkSweepGradient.h ('k') | src/effects/gradients/SkTwoPointConicalGradient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698