OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
4 * Copyright (C) 2008 Dirk Schulze <vbs85@gmx.de> | 4 * Copyright (C) 2008 Dirk Schulze <vbs85@gmx.de> |
5 * Copyright (C) 2008 Nuanti Ltd. | 5 * Copyright (C) 2008 Nuanti Ltd. |
6 * | 6 * |
7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
9 * are met: | 9 * are met: |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 { | 99 { |
100 destroyGraphicsContextPrivate(m_common); | 100 destroyGraphicsContextPrivate(m_common); |
101 delete m_data; | 101 delete m_data; |
102 } | 102 } |
103 | 103 |
104 TransformationMatrix GraphicsContext::getCTM() const | 104 TransformationMatrix GraphicsContext::getCTM() const |
105 { | 105 { |
106 cairo_t* cr = platformContext(); | 106 cairo_t* cr = platformContext(); |
107 cairo_matrix_t m; | 107 cairo_matrix_t m; |
108 cairo_get_matrix(cr, &m); | 108 cairo_get_matrix(cr, &m); |
109 return m; | 109 return TransformationMatrix(m.xx, m.yx, m.xy, m.yy, m.x0, m.y0); |
110 } | 110 } |
111 | 111 |
112 cairo_t* GraphicsContext::platformContext() const | 112 cairo_t* GraphicsContext::platformContext() const |
113 { | 113 { |
114 return m_data->cr; | 114 return m_data->cr; |
115 } | 115 } |
116 | 116 |
117 void GraphicsContext::savePlatformState() | 117 void GraphicsContext::savePlatformState() |
118 { | 118 { |
119 cairo_save(m_data->cr); | 119 cairo_save(m_data->cr); |
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 { | 725 { |
726 notImplemented(); | 726 notImplemented(); |
727 } | 727 } |
728 | 728 |
729 void GraphicsContext::concatCTM(const TransformationMatrix& transform) | 729 void GraphicsContext::concatCTM(const TransformationMatrix& transform) |
730 { | 730 { |
731 if (paintingDisabled()) | 731 if (paintingDisabled()) |
732 return; | 732 return; |
733 | 733 |
734 cairo_t* cr = m_data->cr; | 734 cairo_t* cr = m_data->cr; |
735 const cairo_matrix_t* matrix = reinterpret_cast<const cairo_matrix_t*>(&tran
sform); | 735 const cairo_matrix_t matrix = cairo_matrix_t(transform); |
736 cairo_transform(cr, matrix); | 736 cairo_transform(cr, &matrix); |
737 m_data->concatCTM(transform); | 737 m_data->concatCTM(transform); |
738 } | 738 } |
739 | 739 |
740 void GraphicsContext::addInnerRoundedRectClip(const IntRect& rect, int thickness
) | 740 void GraphicsContext::addInnerRoundedRectClip(const IntRect& rect, int thickness
) |
741 { | 741 { |
742 if (paintingDisabled()) | 742 if (paintingDisabled()) |
743 return; | 743 return; |
744 | 744 |
745 clip(rect); | 745 clip(rect); |
746 | 746 |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1093 | 1093 |
1094 InterpolationQuality GraphicsContext::imageInterpolationQuality() const | 1094 InterpolationQuality GraphicsContext::imageInterpolationQuality() const |
1095 { | 1095 { |
1096 return InterpolationDefault; | 1096 return InterpolationDefault; |
1097 } | 1097 } |
1098 | 1098 |
1099 } // namespace WebCore | 1099 } // namespace WebCore |
1100 | 1100 |
1101 #endif // PLATFORM(CAIRO) | 1101 #endif // PLATFORM(CAIRO) |
1102 | 1102 |
OLD | NEW |