From 3c8520eec0445845981def668027e7d41f5533cf Mon Sep 17 00:00:00 2001 From: Bas Schouten Date: Mon, 23 Apr 2012 13:30:46 -0400 Subject: [PATCH] Bug 746588 - Invert the gfxPattern matrix when using DrawTargets. r=jrmuizel a=akeybl --- gfx/thebes/gfxPattern.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gfx/thebes/gfxPattern.cpp b/gfx/thebes/gfxPattern.cpp index 8f57f325067..31b7919272e 100644 --- a/gfx/thebes/gfxPattern.cpp +++ b/gfx/thebes/gfxPattern.cpp @@ -132,6 +132,10 @@ gfxPattern::SetMatrix(const gfxMatrix& matrix) cairo_pattern_set_matrix(mPattern, &mat); } else { mTransform = ToMatrix(matrix); + // Cairo-pattern matrices specify the conversion from DrawTarget to pattern + // space. Azure pattern matrices specify the conversion from pattern to + // DrawTarget space. + mTransform.Invert(); } }