aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils
diff options
context:
space:
mode:
authorGravatar djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-03-21 15:39:03 +0000
committerGravatar djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-03-21 15:39:03 +0000
commite63793a2c8d2871bf7d95195be7b93ff669688d7 (patch)
tree5b3f833f7cbb71470a9e2aba50e8dc7b2078e04b /src/utils
parent0ffc56f6745e3c5d9a9baa15a3259da5fea0f88a (diff)
Upstream changes from Android repository.
Review URL: https://codereview.appspot.com/5752055 git-svn-id: http://skia.googlecode.com/svn/trunk@3449 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/SkCamera.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/utils/SkCamera.cpp b/src/utils/SkCamera.cpp
index a3872571ba..ac6fa0fb83 100644
--- a/src/utils/SkCamera.cpp
+++ b/src/utils/SkCamera.cpp
@@ -371,6 +371,18 @@ void Sk3DView::setCameraLocation(SkScalar x, SkScalar y, SkScalar z) {
fCamera.update();
}
+
+SkScalar Sk3DView::getCameraLocationX() {
+ return fCamera.fLocation.fX / SkFloatToScalar(72.0f);
+}
+
+SkScalar Sk3DView::getCameraLocationY() {
+ return fCamera.fLocation.fY / SkFloatToScalar(72.0f);
+}
+
+SkScalar Sk3DView::getCameraLocationZ() {
+ return fCamera.fLocation.fZ / SkFloatToScalar(72.0f);
+}
#endif
void Sk3DView::translate(SkScalar x, SkScalar y, SkScalar z) {