| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 4 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
| 5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
| 6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> | 6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> |
| 7 * | 7 * |
| 8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
| 9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
| 10 * are met: | 10 * are met: |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 | 350 |
| 351 void CanvasRenderingContext2D::scale(float sx, float sy) | 351 void CanvasRenderingContext2D::scale(float sx, float sy) |
| 352 { | 352 { |
| 353 GraphicsContext* c = drawingContext(); | 353 GraphicsContext* c = drawingContext(); |
| 354 if (!c) | 354 if (!c) |
| 355 return; | 355 return; |
| 356 if (!state().m_invertibleCTM) | 356 if (!state().m_invertibleCTM) |
| 357 return; | 357 return; |
| 358 | 358 |
| 359 TransformationMatrix newTransform = state().m_transform; | 359 TransformationMatrix newTransform = state().m_transform; |
| 360 newTransform.scale(sx, sy); | 360 newTransform.scaleNonUniform(sx, sy); |
| 361 if (!newTransform.isInvertible()) { | 361 if (!newTransform.isInvertible()) { |
| 362 state().m_invertibleCTM = false; | 362 state().m_invertibleCTM = false; |
| 363 return; | 363 return; |
| 364 } | 364 } |
| 365 | 365 |
| 366 state().m_transform = newTransform; | 366 state().m_transform = newTransform; |
| 367 c->scale(FloatSize(sx, sy)); | 367 c->scale(FloatSize(sx, sy)); |
| 368 m_path.transform(TransformationMatrix().scale(1.0/sx, 1.0/sy)); | 368 m_path.transform(TransformationMatrix().scaleNonUniform(1.0/sx, 1.0/sy)); |
| 369 } | 369 } |
| 370 | 370 |
| 371 void CanvasRenderingContext2D::rotate(float angleInRadians) | 371 void CanvasRenderingContext2D::rotate(float angleInRadians) |
| 372 { | 372 { |
| 373 GraphicsContext* c = drawingContext(); | 373 GraphicsContext* c = drawingContext(); |
| 374 if (!c) | 374 if (!c) |
| 375 return; | 375 return; |
| 376 if (!state().m_invertibleCTM) | 376 if (!state().m_invertibleCTM) |
| 377 return; | 377 return; |
| 378 | 378 |
| (...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1452 } | 1452 } |
| 1453 | 1453 |
| 1454 const Font& CanvasRenderingContext2D::accessFont() | 1454 const Font& CanvasRenderingContext2D::accessFont() |
| 1455 { | 1455 { |
| 1456 if (!state().m_realizedFont) | 1456 if (!state().m_realizedFont) |
| 1457 setFont(state().m_unparsedFont); | 1457 setFont(state().m_unparsedFont); |
| 1458 return state().m_font; | 1458 return state().m_font; |
| 1459 } | 1459 } |
| 1460 | 1460 |
| 1461 } // namespace WebCore | 1461 } // namespace WebCore |
| OLD | NEW |