aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-01 15:01:24 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-01 15:01:24 +0000
commit487b5606e2ddaf15d733b7d46fe2bfa2246aa51d (patch)
treeed43ccb41ce9c365ad6b2450044af8ee318ef141 /gm
parentba3a3c93b255639f7841b973294a938b103491f3 (diff)
add width() and height() helpers
git-svn-id: http://skia.googlecode.com/svn/trunk@7511 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm')
-rw-r--r--gm/gm.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gm/gm.h b/gm/gm.h
index 0af928593f..6ffb0298e7 100644
--- a/gm/gm.h
+++ b/gm/gm.h
@@ -53,6 +53,13 @@ namespace skiagm {
return this->onGetFlags();
}
+ SkScalar width() {
+ return SkIntToScalar(this->getISize().width());
+ }
+ SkScalar height() {
+ return SkIntToScalar(this->getISize().width());
+ }
+
// TODO(vandebo) Instead of exposing this, we should run all the GMs
// with and without an initial transform.
// Most GMs will return the identity matrix, but some PDFs tests