diff options
author | Tim Murray <timmurray@google.com> | 2012-12-14 16:01:58 -0800 |
---|---|---|
committer | Tim Murray <timmurray@google.com> | 2012-12-17 12:10:55 -0800 |
commit | fbfaa853630edfca25eaa840f92035713eef13ba (patch) | |
tree | 21983f382e05d870b206907fbd4addd8836287c6 /graphics/java/android/renderscript/Script.java | |
parent | 85ae89dcbaa3aec500d89dd597b5b3befcfad0b3 (diff) |
Add struct for controlling clipping in Java.
Change-Id: Iac747e492c680530553909b0389b230fbc654e30
Diffstat (limited to 'graphics/java/android/renderscript/Script.java')
-rw-r--r-- | graphics/java/android/renderscript/Script.java | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/graphics/java/android/renderscript/Script.java b/graphics/java/android/renderscript/Script.java index 3fe3261629ba..fe80967e6f35 100644 --- a/graphics/java/android/renderscript/Script.java +++ b/graphics/java/android/renderscript/Script.java @@ -318,5 +318,44 @@ public class Script extends BaseObj { public void updateAllocation() { } } + + public static final class LaunchOptions { + protected int xstart = -1; + protected int ystart = -1; + protected int xend = -1 ; + protected int yend = -1; + + protected int strategy; + + public void setX(int xstartArg, int xendArg) { + if (xstartArg < 0 || xendArg <= xstartArg) { + throw new RSIllegalArgumentException("Invalid dimensions"); + } + xstart = xstartArg; + xend = xendArg; + } + + public void setY(int ystartArg, int yendArg) { + if (ystartArg < 0 || yendArg <= ystartArg) { + throw new RSIllegalArgumentException("Invalid dimensions"); + } + ystart = ystartArg; + yend = yendArg; + } + + public int getXStart() { + return xstart; + } + public int getXEnd() { + return xend; + } + public int getYStart() { + return ystart; + } + public int getYEnd() { + return yend; + } + + } } |