OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 for (unsigned x = 0; x < m_clipData.clipData().size(); x++) { | 65 for (unsigned x = 0; x < m_clipData.clipData().size(); x++) { |
66 ClipData clipData = m_clipData.clipData()[x]; | 66 ClipData clipData = m_clipData.clipData()[x]; |
67 if (clipData.windRule != clipRule) | 67 if (clipData.windRule != clipRule) |
68 heterogenousClipRules = true; | 68 heterogenousClipRules = true; |
69 | 69 |
70 Path clipPath = clipData.path; | 70 Path clipPath = clipData.path; |
71 | 71 |
72 if (clipData.bboxUnits) { | 72 if (clipData.bboxUnits) { |
73 TransformationMatrix transform; | 73 TransformationMatrix transform; |
74 transform.translate(boundingBox.x(), boundingBox.y()); | 74 transform.translate(boundingBox.x(), boundingBox.y()); |
75 transform.scale(boundingBox.width(), boundingBox.height()); | 75 transform.scaleNonUniform(boundingBox.width(), boundingBox.height())
; |
76 clipPath.transform(transform); | 76 clipPath.transform(transform); |
77 } | 77 } |
78 context->addPath(clipPath); | 78 context->addPath(clipPath); |
79 } | 79 } |
80 | 80 |
81 // FIXME! | 81 // FIXME! |
82 // We don't currently allow for heterogenous clip rules. | 82 // We don't currently allow for heterogenous clip rules. |
83 // we would have to detect such, draw to a mask, and then clip | 83 // we would have to detect such, draw to a mask, and then clip |
84 // to that mask | 84 // to that mask |
85 context->clipPath(clipRule); | 85 context->clipPath(clipRule); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 if (resource && resource->isClipper()) | 131 if (resource && resource->isClipper()) |
132 return static_cast<SVGResourceClipper*>(resource); | 132 return static_cast<SVGResourceClipper*>(resource); |
133 | 133 |
134 return 0; | 134 return 0; |
135 } | 135 } |
136 | 136 |
137 } // namespace WebCore | 137 } // namespace WebCore |
138 | 138 |
139 #endif | 139 #endif |
140 | 140 |
OLD | NEW |