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

Unified Diff: src/pdf/SkPDFShader.cpp

Issue 16094020: Fixed a bug with linear gradient PDF matrices and added test cases (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Attempt at fixing Mac build Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/gmslides.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFShader.cpp
diff --git a/src/pdf/SkPDFShader.cpp b/src/pdf/SkPDFShader.cpp
index b52111e25d018f29601f0630b02d5782bb32991f..a0dffb7791fc4724ecc5a16403fc4b4b2efa6b58 100644
--- a/src/pdf/SkPDFShader.cpp
+++ b/src/pdf/SkPDFShader.cpp
@@ -37,8 +37,8 @@ static void unitToPointsMatrix(const SkPoint pts[2], SkMatrix* matrix) {
vec.scale(inv);
matrix->setSinCos(vec.fY, vec.fX);
- matrix->preTranslate(pts[0].fX, pts[0].fY);
matrix->preScale(mag, mag);
+ matrix->postTranslate(pts[0].fX, pts[0].fY);
}
/* Assumes t + startOffset is on the stack and does a linear interpolation on t
@@ -609,8 +609,9 @@ SkPDFFunctionShader::SkPDFFunctionShader(SkPDFShader::State* state)
SkMatrix mapperMatrix;
unitToPointsMatrix(transformPoints, &mapperMatrix);
SkMatrix finalMatrix = fState.get()->fCanvasTransform;
- finalMatrix.preConcat(mapperMatrix);
finalMatrix.preConcat(fState.get()->fShaderTransform);
+ finalMatrix.preConcat(mapperMatrix);
+
SkRect bbox;
bbox.set(fState.get()->fBBox);
if (!transformBBox(finalMatrix, &bbox)) {
« no previous file with comments | « gyp/gmslides.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698