Chromium Code Reviews| Index: Source/core/html/canvas/CanvasRenderingContext2D.cpp |
| diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.cpp b/Source/core/html/canvas/CanvasRenderingContext2D.cpp |
| index 4d7b8c43d0a40af0aecb4b810b8fecb7bba8f5b4..032730641df98c9d8a13ccd4df0c237250a3731a 100644 |
| --- a/Source/core/html/canvas/CanvasRenderingContext2D.cpp |
| +++ b/Source/core/html/canvas/CanvasRenderingContext2D.cpp |
| @@ -596,6 +596,16 @@ void CanvasRenderingContext2D::setGlobalCompositeOperation(const String& operati |
| c->setCompositeOperation(op, blendMode); |
| } |
| +void CanvasRenderingContext2D::setCurrentTransform(SVGPropertyTearOff<SVGMatrix>* currentTransform, ExceptionState& es) |
| +{ |
| + if (!currentTransform) { |
| + es.throwDOMException(TypeError); |
| + return; |
| + } |
| + const SVGMatrix& matrix = currentTransform->propertyReference(); |
| + setTransform(matrix.a(), matrix.b(), matrix.c(), matrix.d(), matrix.e(), matrix.f()); |
| +} |
| + |
| void CanvasRenderingContext2D::scale(float sx, float sy) |
| { |
| GraphicsContext* c = drawingContext(); |
| @@ -698,12 +708,12 @@ void CanvasRenderingContext2D::transform(float m11, float m12, float m21, float |
| realizeSaves(); |
| + modifiableState().m_transform = newTransform; |
|
dshwang
2013/09/20 11:38:52
when setting non-invertible matrix, currentTransfo
|
| if (!newTransform.isInvertible()) { |
| modifiableState().m_invertibleCTM = false; |
| return; |
| } |
| - modifiableState().m_transform = newTransform; |
| c->concatCTM(transform); |
| m_path.transform(transform.inverse()); |
| } |