OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Dirk Mueller <mueller@kde.org> | 2 * Copyright (C) 2006 Dirk Mueller <mueller@kde.org> |
3 * Copyright (C) 2006 Zack Rusin <zack@kde.org> | 3 * Copyright (C) 2006 Zack Rusin <zack@kde.org> |
4 * Copyright (C) 2006 George Staikos <staikos@kde.org> | 4 * Copyright (C) 2006 George Staikos <staikos@kde.org> |
5 * Copyright (C) 2006 Simon Hausmann <hausmann@kde.org> | 5 * Copyright (C) 2006 Simon Hausmann <hausmann@kde.org> |
6 * Copyright (C) 2006 Allan Sandfeld Jensen <sandfeld@kde.org> | 6 * Copyright (C) 2006 Allan Sandfeld Jensen <sandfeld@kde.org> |
7 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> | 7 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> |
8 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv
ed. | 8 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv
ed. |
9 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies). | 9 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies). |
10 * Copyright (C) 2008 Dirk Schulze <vbs85@gmx.de> | 10 * Copyright (C) 2008 Dirk Schulze <vbs85@gmx.de> |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 delete m_data; | 259 delete m_data; |
260 } | 260 } |
261 | 261 |
262 PlatformGraphicsContext* GraphicsContext::platformContext() const | 262 PlatformGraphicsContext* GraphicsContext::platformContext() const |
263 { | 263 { |
264 return m_data->p(); | 264 return m_data->p(); |
265 } | 265 } |
266 | 266 |
267 TransformationMatrix GraphicsContext::getCTM() const | 267 TransformationMatrix GraphicsContext::getCTM() const |
268 { | 268 { |
269 return platformContext()->combinedMatrix(); | 269 QMatrix matrix(platformContext()->combinedMatrix()); |
| 270 return TransformationMatrix(matrix.m11(), matrix.m12(), matrix.m21(), matrix
.m22(), matrix.dx(), matrix.dy()); |
270 } | 271 } |
271 | 272 |
272 void GraphicsContext::savePlatformState() | 273 void GraphicsContext::savePlatformState() |
273 { | 274 { |
274 m_data->p()->save(); | 275 m_data->p()->save(); |
275 } | 276 } |
276 | 277 |
277 void GraphicsContext::restorePlatformState() | 278 void GraphicsContext::restorePlatformState() |
278 { | 279 { |
279 m_data->p()->restore(); | 280 m_data->p()->restore(); |
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
949 void GraphicsContext::scale(const FloatSize& s) | 950 void GraphicsContext::scale(const FloatSize& s) |
950 { | 951 { |
951 if (paintingDisabled()) | 952 if (paintingDisabled()) |
952 return; | 953 return; |
953 | 954 |
954 m_data->p()->scale(s.width(), s.height()); | 955 m_data->p()->scale(s.width(), s.height()); |
955 | 956 |
956 if (!m_data->currentPath.isEmpty()) { | 957 if (!m_data->currentPath.isEmpty()) { |
957 QMatrix matrix; | 958 QMatrix matrix; |
958 m_data->currentPath = m_data->currentPath * matrix.scale(1 / s.width(),
1 / s.height()); | 959 m_data->currentPath = m_data->currentPath * matrix.scale(1 / s.width(),
1 / s.height()); |
959 m_common->state.pathTransform.scale(s.width(), s.height()); | 960 m_common->state.pathTransform.scaleNonUniform(s.width(), s.height()); |
960 } | 961 } |
961 } | 962 } |
962 | 963 |
963 void GraphicsContext::clipOut(const IntRect& rect) | 964 void GraphicsContext::clipOut(const IntRect& rect) |
964 { | 965 { |
965 if (paintingDisabled()) | 966 if (paintingDisabled()) |
966 return; | 967 return; |
967 | 968 |
968 QPainter *p = m_data->p(); | 969 QPainter *p = m_data->p(); |
969 QRectF clipBounds = p->clipPath().boundingRect(); | 970 QRectF clipBounds = p->clipPath().boundingRect(); |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1173 | 1174 |
1174 InterpolationQuality GraphicsContext::imageInterpolationQuality() const | 1175 InterpolationQuality GraphicsContext::imageInterpolationQuality() const |
1175 { | 1176 { |
1176 return InterpolationDefault; | 1177 return InterpolationDefault; |
1177 } | 1178 } |
1178 | 1179 |
1179 } | 1180 } |
1180 | 1181 |
1181 // vim: ts=4 sw=4 et | 1182 // vim: ts=4 sw=4 et |
1182 | 1183 |
OLD | NEW |