summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2009-09-10 14:32:16 -0700
committerDianne Hackborn <hackbod@google.com>2009-09-11 13:31:45 -0700
commit8cae124af2142687a6833dbaab8a43df6dd67b43 (patch)
tree662ea14668e4b07cb2336d62fdb0241713182480 /graphics
parent7ff269f359a8848fd0c39993d8fe21a8324806f9 (diff)
downloadframeworks_base-8cae124af2142687a6833dbaab8a43df6dd67b43.zip
frameworks_base-8cae124af2142687a6833dbaab8a43df6dd67b43.tar.gz
frameworks_base-8cae124af2142687a6833dbaab8a43df6dd67b43.tar.bz2
Various cleanup around resources and nine-patches.
Remove the stuff that doesn't use preloaded drawables when in compatibility mode, since this works fine ever since we were able to deal with drawables in a different density than the canvas. Change the snapshot function on View to return a snapshot at the same size that will actually be drawn on screen (when in compatibility mode), to be able to show scaling artifacts and all. This change was original an attempt to fix issue #2101917: Text field edges appears to be improperly rounded. That turns out to probably be something deeper in the graphics system, but also included here is the debugging code I did to try to track down the problem to make it easy to turn on again later. Change-Id: I34bfca629639c7ff103f3989d88874112ef778d9
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/graphics/drawable/NinePatchDrawable.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/graphics/java/android/graphics/drawable/NinePatchDrawable.java b/graphics/java/android/graphics/drawable/NinePatchDrawable.java
index 924e19e..997efb8 100644
--- a/graphics/java/android/graphics/drawable/NinePatchDrawable.java
+++ b/graphics/java/android/graphics/drawable/NinePatchDrawable.java
@@ -21,6 +21,7 @@ import android.content.res.Resources;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
+import android.util.Log;
import android.util.TypedValue;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
@@ -170,6 +171,11 @@ public class NinePatchDrawable extends Drawable {
@Override
public void draw(Canvas canvas) {
+ if (false) {
+ float[] pts = new float[2];
+ canvas.getMatrix().mapPoints(pts);
+ Log.v("9patch", "Drawing 9-patch @ " + pts[0] + "," + pts[1] + ": " + getBounds());
+ }
mNinePatch.draw(canvas, getBounds(), mPaint);
}