Bug 952977: Switch GetMarkerTransform to gfx::Matrix r=nical

This commit is contained in:
David Zbarsky 2013-12-30 01:50:08 -05:00
parent a574e57920
commit 9ebab3c8b3
3 changed files with 12 additions and 12 deletions

View File

@ -296,7 +296,7 @@ SVGMarkerElement::GetPreserveAspectRatio()
//----------------------------------------------------------------------
// public helpers
gfxMatrix
gfx::Matrix
SVGMarkerElement::GetMarkerTransform(float aStrokeWidth,
float aX, float aY, float aAutoAngle,
bool aIsStart)
@ -317,9 +317,9 @@ SVGMarkerElement::GetMarkerTransform(float aStrokeWidth,
break;
}
return gfxMatrix(cos(angle) * scale, sin(angle) * scale,
-sin(angle) * scale, cos(angle) * scale,
aX, aY);
return gfx::Matrix(cos(angle) * scale, sin(angle) * scale,
-sin(angle) * scale, cos(angle) * scale,
aX, aY);
}
nsSVGViewBoxRect

View File

@ -121,9 +121,9 @@ public:
virtual bool HasValidDimensions() const MOZ_OVERRIDE;
// public helpers
gfxMatrix GetMarkerTransform(float aStrokeWidth,
float aX, float aY, float aAutoAngle,
bool aIsStart);
mozilla::gfx::Matrix GetMarkerTransform(float aStrokeWidth,
float aX, float aY, float aAutoAngle,
bool aIsStart);
nsSVGViewBoxRect GetViewBoxRect();
gfxMatrix GetViewBoxTransform();

View File

@ -86,11 +86,11 @@ nsSVGMarkerFrame::GetCanvasTM(uint32_t aFor, nsIFrame* aTransformRoot)
gfxMatrix markedTM = mMarkedFrame->GetCanvasTM(aFor, aTransformRoot);
mInUse2 = false;
gfxMatrix markerTM = content->GetMarkerTransform(mStrokeWidth, mX, mY,
mAutoAngle, mIsStart);
Matrix markerTM = content->GetMarkerTransform(mStrokeWidth, mX, mY,
mAutoAngle, mIsStart);
gfxMatrix viewBoxTM = content->GetViewBoxTransform();
return viewBoxTM * markerTM * markedTM;
return viewBoxTM * ThebesMatrix(markerTM) * markedTM;
}
static nsIFrame*
@ -184,11 +184,11 @@ nsSVGMarkerFrame::GetMarkBBoxContribution(const Matrix &aToBBoxUserspace,
mAutoAngle = aMark->angle;
mIsStart = aMark->type == nsSVGMark::eStart;
gfxMatrix markerTM =
Matrix markerTM =
content->GetMarkerTransform(mStrokeWidth, mX, mY, mAutoAngle, mIsStart);
gfxMatrix viewBoxTM = content->GetViewBoxTransform();
Matrix tm = ToMatrix(viewBoxTM * markerTM) * aToBBoxUserspace;
Matrix tm = ToMatrix(viewBoxTM) * markerTM * aToBBoxUserspace;
nsISVGChildFrame* child = do_QueryFrame(GetAnonymousChildFrame(this));
// When we're being called to obtain the invalidation area, we need to