OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. |
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 return m_imageBuffer.get(); | 273 return m_imageBuffer.get(); |
274 } | 274 } |
275 | 275 |
276 TransformationMatrix HTMLCanvasElement::baseTransform() const | 276 TransformationMatrix HTMLCanvasElement::baseTransform() const |
277 { | 277 { |
278 ASSERT(m_createdImageBuffer); | 278 ASSERT(m_createdImageBuffer); |
279 FloatSize unscaledSize(width(), height()); | 279 FloatSize unscaledSize(width(), height()); |
280 IntSize size = convertLogicalToDevice(unscaledSize); | 280 IntSize size = convertLogicalToDevice(unscaledSize); |
281 TransformationMatrix transform; | 281 TransformationMatrix transform; |
282 if (size.width() && size.height()) | 282 if (size.width() && size.height()) |
283 transform.scale(size.width() / unscaledSize.width(), size.height() / uns
caledSize.height()); | 283 transform.scaleNonUniform(size.width() / unscaledSize.width(), size.heig
ht() / unscaledSize.height()); |
284 transform.multiply(m_imageBuffer->baseTransform()); | 284 transform.multiply(m_imageBuffer->baseTransform()); |
285 return transform; | 285 return transform; |
286 } | 286 } |
287 | 287 |
288 } | 288 } |
OLD | NEW |