Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: third_party/WebKit/WebCore/svg/graphics/SVGResourceMarker.cpp

Issue 21184: WebKit merge 40722:40785 (part 1) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 currentlyDrawingMarkers.add(this); 75 currentlyDrawingMarkers.add(this);
76 76
77 TransformationMatrix transform; 77 TransformationMatrix transform;
78 transform.translate(x, y); 78 transform.translate(x, y);
79 transform.rotate(m_angle > -1 ? m_angle : angle); 79 transform.rotate(m_angle > -1 ? m_angle : angle);
80 80
81 // refX and refY are given in coordinates relative to the viewport establish ed by the marker, yet they affect 81 // refX and refY are given in coordinates relative to the viewport establish ed by the marker, yet they affect
82 // the translation performed on the viewport itself. 82 // the translation performed on the viewport itself.
83 TransformationMatrix viewportTransform; 83 TransformationMatrix viewportTransform;
84 if (m_useStrokeWidth) 84 if (m_useStrokeWidth)
85 viewportTransform.scale(strokeWidth, strokeWidth); 85 viewportTransform.scaleNonUniform(strokeWidth, strokeWidth);
86 viewportTransform *= m_marker->viewportTransform(); 86 viewportTransform *= m_marker->viewportTransform();
87 double refX, refY; 87 double refX, refY;
88 viewportTransform.map(m_refX, m_refY, &refX, &refY); 88 viewportTransform.map(m_refX, m_refY, refX, refY);
89 transform.translate(-refX, -refY); 89 transform.translate(-refX, -refY);
90 90
91 if (m_useStrokeWidth) 91 if (m_useStrokeWidth)
92 transform.scale(strokeWidth, strokeWidth); 92 transform.scaleNonUniform(strokeWidth, strokeWidth);
93 93
94 // FIXME: PaintInfo should be passed into this method instead of being creat ed here 94 // FIXME: PaintInfo should be passed into this method instead of being creat ed here
95 // FIXME: bounding box fractions are lost 95 // FIXME: bounding box fractions are lost
96 RenderObject::PaintInfo info(context, enclosingIntRect(rect), PaintPhaseFore ground, 0, 0, 0); 96 RenderObject::PaintInfo info(context, enclosingIntRect(rect), PaintPhaseFore ground, 0, 0, 0);
97 97
98 context->save(); 98 context->save();
99 context->concatCTM(transform); 99 context->concatCTM(transform);
100 m_marker->setDrawsContents(true); 100 m_marker->setDrawsContents(true);
101 m_marker->paint(info, 0, 0); 101 m_marker->paint(info, 0, 0);
102 m_marker->setDrawsContents(false); 102 m_marker->setDrawsContents(false);
(...skipping 29 matching lines...) Expand all
132 if (resource && resource->isMarker()) 132 if (resource && resource->isMarker())
133 return static_cast<SVGResourceMarker*>(resource); 133 return static_cast<SVGResourceMarker*>(resource);
134 134
135 return 0; 135 return 0;
136 } 136 }
137 137
138 } // namespace WebCore 138 } // namespace WebCore
139 139
140 #endif 140 #endif
141 141
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/svg/graphics/SVGResourceClipper.cpp ('k') | third_party/WebKit/WebCore/wml/WMLAElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698