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

Unified Diff: third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.cpp

Issue 17454: Fixing gradient problem. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
===================================================================
--- third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.cpp (revision 7841)
+++ third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.cpp (working copy)
@@ -378,9 +378,18 @@
void PlatformContextSkia::addPath(const SkPath& path)
{
- m_path.addPath(path);
+ m_path.addPath(path, m_canvas->getTotalMatrix());
}
+SkPath PlatformContextSkia::currentPathInLocalCoordinates() const {
+ SkPath local_path = m_path;
+ const SkMatrix& matrix = m_canvas->getTotalMatrix();
+ SkMatrix inverse_matrix;
+ matrix.invert(&inverse_matrix);
+ local_path.transform(inverse_matrix);
+ return local_path;
+}
+
void PlatformContextSkia::setFillRule(SkPath::FillType fr)
{
m_path.setFillType(fr);

Powered by Google App Engine
This is Rietveld 408576698