Bug 811919. Include the pattern transform when painting patterns in DrawTargetCG. r=benwa

This fixes a lot of azure content bugs.

--HG--
extra : rebase_source : be84084aa7753862920ddd7b04fbfb0bd0b54ded
This commit is contained in:
Jeff Muizelaar 2012-11-14 16:52:02 -08:00
parent e72020c194
commit 8c9b653c40

View File

@ -409,7 +409,11 @@ CreateCGPattern(const Pattern &aPattern, CGAffineTransform aUserSpace)
{0, 0,},
{static_cast<CGFloat>(CGImageGetWidth(image)), static_cast<CGFloat>(CGImageGetHeight(image))}
};
CGAffineTransform transform = CGAffineTransformConcat(CGAffineTransformMakeScale(1, -1), aUserSpace);
CGAffineTransform transform =
CGAffineTransformConcat(CGAffineTransformConcat(CGAffineTransformMakeScale(1,
-1),
GfxMatrixToCGAffineTransform(pat.mMatrix)),
aUserSpace);
transform = CGAffineTransformTranslate(transform, 0, -static_cast<float>(CGImageGetHeight(image)));
return CGPatternCreate(CGImageRetain(image), bounds, transform, xStep, yStep, kCGPatternTilingConstantSpacing,
true, &patternCallbacks);