Transformable views: Use the transformation for points and events.
Added and updated API for converting points between views' coordinate systems,
taking transformations into consideration. This in turn gives us, for free,
transformation for located events (mouse events, touch events).
BUG=none
TEST=ViewTest.TransformEvent
Review URL: http://codereview.chromium.org/6534015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75960 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/ui/gfx/canvas.h b/ui/gfx/canvas.h
index 8c89d59..0149486 100644
--- a/ui/gfx/canvas.h
+++ b/ui/gfx/canvas.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -13,6 +13,10 @@
#include "skia/ext/platform_canvas.h"
#include "ui/gfx/native_widget_types.h"
+namespace ui {
+class Transform;
+}
+
namespace gfx {
class Brush;
@@ -208,6 +212,9 @@
// returned by BeginPlatformPaint().
virtual void EndPlatformPaint() = 0;
+ // Apply transformation on the canvas.
+ virtual void Transform(const ui::Transform& transform) = 0;
+
// TODO(beng): remove this once we don't need to use any skia-specific methods
// through this interface.
// A quick and dirty way to obtain the underlying SkCanvas.