summaryrefslogtreecommitdiffstats
path: root/tools/layoutlib/bridge/src/android/graphics/PathEffect_Delegate.java
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2010-12-20 08:22:47 -0800
committerXavier Ducrohet <xav@android.com>2010-12-21 10:43:18 -0800
commitd348b6eaa98e23cb38d90906df109aaa2d20ea7f (patch)
treec9195fa9628e78108424cbae0dd2a86a12d2faeb /tools/layoutlib/bridge/src/android/graphics/PathEffect_Delegate.java
parent19a021038f2f4683dddef651543d7298f5bd7218 (diff)
downloadframeworks_base-d348b6eaa98e23cb38d90906df109aaa2d20ea7f.zip
frameworks_base-d348b6eaa98e23cb38d90906df109aaa2d20ea7f.tar.gz
frameworks_base-d348b6eaa98e23cb38d90906df109aaa2d20ea7f.tar.bz2
LayoutLib: support for Path and BitmapShader using delegates.
Also created delegates for all missing shader, xfermode and patheffect classes. Moved the logic of the xfermode, and patheffects that was in Canvas_Delegate into the xfermode/patheffect classes, and added support (in all 3 clases) for knowing if the shader/xfermode/patheffect is actually supported or not. Make use of fidelityWarning in LayoutLog if they are not.
Diffstat (limited to 'tools/layoutlib/bridge/src/android/graphics/PathEffect_Delegate.java')
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/PathEffect_Delegate.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/layoutlib/bridge/src/android/graphics/PathEffect_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/PathEffect_Delegate.java
index ce7eef0..c588423 100644
--- a/tools/layoutlib/bridge/src/android/graphics/PathEffect_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/PathEffect_Delegate.java
@@ -18,6 +18,8 @@ package android.graphics;
import com.android.layoutlib.bridge.impl.DelegateManager;
+import java.awt.Stroke;
+
/**
* Delegate implementing the native methods of android.graphics.PathEffect
*
@@ -33,7 +35,7 @@ import com.android.layoutlib.bridge.impl.DelegateManager;
* @see DelegateManager
*
*/
-public class PathEffect_Delegate {
+public abstract class PathEffect_Delegate {
// ---- delegate manager ----
protected static final DelegateManager<PathEffect_Delegate> sManager =
@@ -49,6 +51,11 @@ public class PathEffect_Delegate {
return sManager.getDelegate(nativeShader);
}
+ public abstract Stroke getStroke(Paint_Delegate paint);
+ public abstract boolean isSupported();
+ public abstract String getSupportMessage();
+
+
// ---- native methods ----
/*package*/ static void nativeDestructor(int native_patheffect) {