summaryrefslogtreecommitdiff
path: root/libs/hwui/Matrix.cpp
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2010-09-20 19:04:33 -0700
committerRomain Guy <romainguy@google.com>2010-09-21 16:48:50 -0700
commitddb80bebb0776e6d852aab6e8bba5d5591847a55 (patch)
tree460e39e115bf75648a3b4dbc9788c911751bd848 /libs/hwui/Matrix.cpp
parentee916f14cbd1fe1422c063ce2ef7b185e2bc5c6f (diff)
Add support for circular gradients to the GL renderer.
This change also adds full support for local transformation matrices on sweep and radial gradients. Change-Id: Id8773bc0766575190e3f3d51984fc5e57b266c3f
Diffstat (limited to 'libs/hwui/Matrix.cpp')
-rw-r--r--libs/hwui/Matrix.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/hwui/Matrix.cpp b/libs/hwui/Matrix.cpp
index 264ad3d28077..c698b5abb9c5 100644
--- a/libs/hwui/Matrix.cpp
+++ b/libs/hwui/Matrix.cpp
@@ -144,6 +144,12 @@ float Matrix4::getTranslateY() {
return data[kTranslateY];
}
+void Matrix4::multiply(float v) {
+ for (int i = 0; i < 16; i++) {
+ data[i] *= v;
+ }
+}
+
void Matrix4::loadTranslate(float x, float y, float z) {
loadIdentity();
data[kTranslateX] = x;